-
Bug
-
Resolution: Not an Issue
-
P3
-
None
-
1.4.0
-
generic
-
solaris_2.6
1) MetalInternalFrameTitlePane() throws NPE if created with a default
Windows Look and Feel on WinNT under JDK 1.3, 1.3.1
To reproduce, please run the following test case on Win NT under JDK 1.3 or
JDK 1.3.1:
import javax.swing.*;
import javax.swing.plaf.metal.*;
import com.sun.java.swing.plaf.windows.*;
public class test {
public static void main(String [] args) {
WindowsLookAndFeel wlnf = new WindowsLookAndFeel();
try {
UIManager.setLookAndFeel(wlnf);
} catch (UnsupportedLookAndFeelException ulnfe) {
ulnfe.printStackTrace();
}
JInternalFrame frame = new JInternalFrame();
MetalInternalFrameTitlePane c = new MetalInternalFrameTitlePane(frame);
}
}
Test output:
java.lang.NullPointerException
at javax.swing.plaf.metal.MetalLookAndFeel.getPrimaryControlShadow(MetalLookAndFeel.java:1082)
at javax.swing.plaf.metal.MetalInternalFrameTitlePane.createButtons(MetalInternalFrameTitlePane.java:91)
at javax.swing.plaf.basic.BasicInternalFrameTitlePane.installTitlePane(BasicInternalFrameTitlePane.java:99)
at javax.swing.plaf.basic.BasicInternalFrameTitlePane.<init>(BasicInternalFrameTitlePane.java:77)
at javax.swing.plaf.metal.MetalInternalFrameTitlePane.<init>(MetalInternalFrameTitlePane.java:56)
at test.main(test.java:19)
Exception in thread "main"
After that test hangs
2) Same test under jdk1.4 doesn't produce the NullpointerException,
but also hangs on both windows and solaris.
Windows Look and Feel on WinNT under JDK 1.3, 1.3.1
To reproduce, please run the following test case on Win NT under JDK 1.3 or
JDK 1.3.1:
import javax.swing.*;
import javax.swing.plaf.metal.*;
import com.sun.java.swing.plaf.windows.*;
public class test {
public static void main(String [] args) {
WindowsLookAndFeel wlnf = new WindowsLookAndFeel();
try {
UIManager.setLookAndFeel(wlnf);
} catch (UnsupportedLookAndFeelException ulnfe) {
ulnfe.printStackTrace();
}
JInternalFrame frame = new JInternalFrame();
MetalInternalFrameTitlePane c = new MetalInternalFrameTitlePane(frame);
}
}
Test output:
java.lang.NullPointerException
at javax.swing.plaf.metal.MetalLookAndFeel.getPrimaryControlShadow(MetalLookAndFeel.java:1082)
at javax.swing.plaf.metal.MetalInternalFrameTitlePane.createButtons(MetalInternalFrameTitlePane.java:91)
at javax.swing.plaf.basic.BasicInternalFrameTitlePane.installTitlePane(BasicInternalFrameTitlePane.java:99)
at javax.swing.plaf.basic.BasicInternalFrameTitlePane.<init>(BasicInternalFrameTitlePane.java:77)
at javax.swing.plaf.metal.MetalInternalFrameTitlePane.<init>(MetalInternalFrameTitlePane.java:56)
at test.main(test.java:19)
Exception in thread "main"
After that test hangs
2) Same test under jdk1.4 doesn't produce the NullpointerException,
but also hangs on both windows and solaris.