-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
6
-
generic
-
generic
JDialog and JWindow constructors (no-argument constructors or when passing null as argument) throw IllegalArgumentException instead of HeadlessException in headless mode. This is reproducible from b50 onwards on all platforms.
Stack trace:
Exception in thread "main" java.lang.IllegalArgumentException: headless environment
at java.awt.Window.init(Window.java:304)
at java.awt.Window.<init>(Window.java:299)
at java.awt.Window.<init>(Window.java:425)
at java.awt.Dialog.<init>(Dialog.java:642)
at java.awt.Dialog.<init>(Dialog.java:392)
at javax.swing.JDialog.<init>(JDialog.java:220)
at javax.swing.JDialog.<init>(JDialog.java:167)
at javax.swing.JDialog.<init>(JDialog.java:140)
Stack trace:
Exception in thread "main" java.lang.IllegalArgumentException: headless environment
at java.awt.Window.init(Window.java:304)
at java.awt.Window.<init>(Window.java:299)
at java.awt.Window.<init>(Window.java:425)
at java.awt.Dialog.<init>(Dialog.java:642)
at java.awt.Dialog.<init>(Dialog.java:392)
at javax.swing.JDialog.<init>(JDialog.java:220)
at javax.swing.JDialog.<init>(JDialog.java:167)
at javax.swing.JDialog.<init>(JDialog.java:140)
- duplicates
-
JDK-6366441 Window() constructor should throw HeadlessException instead of IAE in headless mode
- Resolved
- relates to
-
JDK-6300062 JDialog need to support true parent-less mode
- Resolved