-
Bug
-
Resolution: Fixed
-
P2
-
1.4.1
-
beta
-
generic, sparc
-
generic
-
Verified
JPopupMenu.setVisible(true) throws HeadlessException with the AWT PIT build. This is regression from Hopper build 10. No where in API doc it says Component.setVisible nor JPopupMenu.setVisible throws any exceptions.
Stack trace:
Exception in thread "main" java.awt.HeadlessException
at sun.java2d.HeadlessGraphicsEnvironment.getScreenDevices(HeadlessGraphicsEnvironment.java:61)
at javax.swing.JPopupMenu.adjustPopupLocationToFitScreen(JPopupMenu.java:323)
at javax.swing.JPopupMenu.getPopup(JPopupMenu.java:795)
at javax.swing.JPopupMenu.setVisible(JPopupMenu.java:748)
at popup.main(popup.java:4)
java version:
java version "1.4.1-internal"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-internal-martak_06_May_2002_13_55)
Java HotSpot(TM) Client VM (build 1.4.1-beta-b10, mixed mode)
Test Case:
--------------------------------------------------------------------------------
import javax.swing.*;
public class popup {
public static void main(String args[]) {
(new JPopupMenu()).setVisible(true);
}
}
--------------------------------------------------------------------------------
Steps to reproduce:
1. Compile the above program
2. Run using java -Djava.awt.headless=true popup
3. Throws HeadlessException with PIT build
PIT build Location:
/net/sqindia.india.sun.com/export/disk02/awt/PITBUILDS/hopper-b12/
Stack trace:
Exception in thread "main" java.awt.HeadlessException
at sun.java2d.HeadlessGraphicsEnvironment.getScreenDevices(HeadlessGraphicsEnvironment.java:61)
at javax.swing.JPopupMenu.adjustPopupLocationToFitScreen(JPopupMenu.java:323)
at javax.swing.JPopupMenu.getPopup(JPopupMenu.java:795)
at javax.swing.JPopupMenu.setVisible(JPopupMenu.java:748)
at popup.main(popup.java:4)
java version:
java version "1.4.1-internal"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-internal-martak_06_May_2002_13_55)
Java HotSpot(TM) Client VM (build 1.4.1-beta-b10, mixed mode)
Test Case:
--------------------------------------------------------------------------------
import javax.swing.*;
public class popup {
public static void main(String args[]) {
(new JPopupMenu()).setVisible(true);
}
}
--------------------------------------------------------------------------------
Steps to reproduce:
1. Compile the above program
2. Run using java -Djava.awt.headless=true popup
3. Throws HeadlessException with PIT build
PIT build Location:
/net/sqindia.india.sun.com/export/disk02/awt/PITBUILDS/hopper-b12/
- duplicates
-
JDK-4682597 REGRESSION: JCK14: api.javax.swing.JPopupMenu.set_isXXXTests fails in headless
- Closed