setTabContentsModified

fun JComponent.setTabContentsModified(contentsModified: Boolean?)

Specifies that contents of contents of this tab component in JTabbedPane have been modified and not saved. JTabbedPane.setRunModifiedAnimationOnTabCloseButton and JTabbedPane.setRunModifiedAnimationOnTabCloseButton APIs control whether the entire tab or its close button area is animated.

The animation cycles between red, orange and yellow color schemes. In most cases (all but tabs not marked with JTabbedPane.setRunModifiedAnimationOnTabCloseButton and JTabbedPane.setRunModifiedAnimationOnTabCloseButton APIs), the animation will be visible only when the mouse hovers over the close button of the tab. The tooltip of the close button is changed as well to reflect that the container contents are marked as modified.

Parameters

contentsModified

If true, the close button of the matching tab of the matching frame / dialog will be animated.

See also