Is a certain Look and Feel guaranteed to be available?

322 Views Asked by At

From what I've found out, the Nimbus Look and Feel was introduced in Java 6 Update 10.

I have project where I use that Look and Feel.

Is there any situation where, the user has a Java VM newer than 6 update 10 (for example 6 update 26) and the Nimbus Look and Feel is not available ? This situation might occur if for example, Look and Feels can be manually/explicitly removed, but I've not been able to find out if this can be done.

So basically, is there a 100 % guarantee that, if the user has the proper Java VM version, the Nimbus Look and Feel will be available 100 % of the time ?

Thank you in advance.

2

There are 2 best solutions below

3
On BEST ANSWER

There's no clear way for a user to remove a particular Look & Feel from their JVM. Anything is possible, though.

What's wrong with just checking for it in the code?

1
On

In Java 7 the package path is changed ("sun" removed: com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel): javax.swing.plaf.nimbus.NimbusLookAndFeel, so it depends how you invoke the look and feel. In general this action of oracle might be seen as a positive endorsement of the nimbus look and feel.