Reproducible on Solaris & XP. The following code cannot be compiled. Compiler complains NimbusLookAndFeel cannot be found.
import sun.swing.plaf.nimbus.NimbusLookAndFeel;
import com.sun.java.swing.plaf.windows.WindowsLookAndFeel;
import com.sun.java.swing.plaf.motif.MotifLookAndFeel;
import javax.swing.*;
public class NimbusTest extends JFrame {
public NimbusTest() {
try {
UIManager.setLookAndFeel(new NimbusLookAndFeel());
setDefaultCloseOperation(EXIT_ON_CLOSE);
JButton b1= new JButton();
b1.setText("Button 1");
getContentPane().add(b1, java.awt.BorderLayout.CENTER);
pack();
} catch (UnsupportedLookAndFeelException e) {
e.printStackTrace();
}
}
public static void main(String[] args) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new NimbusTest().setVisible(true);
}
});
}
}
Error message:
NimbusTest.java:3: package sun.swing.plaf.nimbus does not exist
import sun.swing.plaf.nimbus.NimbusLookAndFeel;
^
NimbusTest.java:12: cannot find symbol
symbol : class NimbusLookAndFeel
location: class NimbusTest
UIManager.setLookAndFeel(new NimbusLookAndFeel());
This is reproducible with 6u5b04 & b05.