Java update on Mac

Hello everyone,

June, 15th 2009 : Apple released an update for Java on Mac for Mac OS X Tiger and Leopard : http://bit.ly/3NRDS.
This update brings more reliability, security and compatibility with Java SE 6 and previous version. But the thing I appreciate is the availability of the skin Nimbus (released with the Java 1.6 update 10 on others platforms) on Mac OS🙂
I like this brand new skin Sun made some month ago. So now, You can set this skin up for your Java application.
If You don’t know how to do that, look at this, it’s pretty simple:)

For example, set the skin, directly in the main method, before creating any Swing component (JFrame, JWindow…)

try {

// Try to set the Nimbus look’n’feel
// You have to do it in a try block, in case the skin isn’t found
UIManager.setLookAndFeel(“com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel”);

} catch (ClassNotFoundException ex) {
} catch (InstantiationException ex) {
} catch (IllegalAccessException ex) {
} catch (UnsupportedLookAndFeelException ex) {
} finally {

// Start your GUI. If the skin isn’t found, the default one is used

}

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: