Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6322433

REGRESSION: JDialog and JWindow throw IAE in headless mode

XMLWordPrintable

    • 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)

            art Artem Ananiev (Inactive)
            gramachasunw Girish Ramachandran (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: