Monday, December 14, 2009

OS X "Dirty Dot"

To use the OS X "Dirty Dot" to indicate that changes have been made that need to be saved you can use the code snippets below.

To set this "Dirty Dot" use the following code:
myJFrame.getRootPane().putClientProperty("windowModified", Boolean.TRUE);

Use the following line to clear the dot after a save has occurred:
myJFrame.getRootPane().putClientProperty("windowModified", Boolean.FALSE);


Popular Posts