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

awt/swing not supported in 16 color mode

    XMLWordPrintable

Details

    • Bug
    • Resolution: Not an Issue
    • P5
    • None
    • 1.3.0
    • client-libs
    • x86
    • windows_nt

    Description

      With 16 color mode display setting(in windows) i get the following exception
      with Frame:

      Exception in thread "main" java.lang.ExceptionInInitializerError: java.lang.Runt
      imeException:
      Unable to create a suitable default GraphicsConfiguration. Try changing your Di
      splay Settings.
              at sun.awt.Win32GraphicsDevice.getDefaultPixID(Native Method)
              at sun.awt.Win32GraphicsDevice.getDefaultConfiguration(Win32GraphicsDevi
      ce.java:136)
              at sun.awt.windows.WToolkit.resetGC(WToolkit.java:91)
              at sun.awt.windows.WToolkit.<clinit>(WToolkit.java:81)
              at java.lang.Class.forName0(Native Method)
              at java.lang.Class.forName(Class.java:199)
              at java.awt.Toolkit$2.run(Toolkit.java:500)
              at java.security.AccessController.doPrivileged(Native Method)
              at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:493)
              at sun.awt.GlobalCursorManager$CursorEvent.<init>(GlobalCursorManager.ja
      va:32)
              at sun.awt.GlobalCursorManager.<clinit>(GlobalCursorManager.java:69)
              at java.awt.Cursor.initIDs(Native Method)
              at java.awt.Cursor.<clinit>(Cursor.java:175)
              at java.awt.Window.<init>(Window.java:186)
              at java.awt.Frame.<init>(Frame.java:319)
              at java.awt.Frame.<init>(Frame.java:266)
              at test.main(test.java:6)

      with JFrame:

      Exception in thread "main" java.lang.ExceptionInInitializerError:
      java.lang.Runt
      imeException:
      Unable to create a suitable default GraphicsConfiguration. Try changing
      your Di
      splay Settings.
              at sun.awt.Win32GraphicsDevice.getDefaultPixID(Native Method)
              at sun.awt.Win32GraphicsDevice.getDefaultConfiguration(Unknown
      Source)
              at sun.awt.windows.WToolkit.resetGC(Unknown Source)
              at sun.awt.windows.WToolkit.<clinit>(Unknown Source)
              at java.lang.Class.forName0(Native Method)
              at java.lang.Class.forName(Unknown Source)
              at java.awt.Toolkit$2.run(Unknown Source)
              at java.security.AccessController.doPrivileged(Native Method)
              at java.awt.Toolkit.getDefaultToolkit(Unknown Source)
              at sun.awt.GlobalCursorManager$CursorEvent.<init>(Unknown
      Source)
              at sun.awt.GlobalCursorManager.<clinit>(Unknown Source)
              at java.awt.Cursor.initIDs(Native Method)
              at java.awt.Cursor.<clinit>(Unknown Source)
              at java.awt.Window.<init>(Unknown Source)
              at java.awt.Frame.<init>(Unknown Source)
              at java.awt.Frame.<init>(Unknown Source)
              at javax.swing.JFrame.<init>(Unknown Source)
              at test.main(Test.java:4)

       Steps to reporduce the error:
       -----------------------------
      1. Change the display setting to 16 color.
      2. Compile TestFrame and TestJFrame(javac TestFrame.java and javac TestJFrame.java).
      3. Execute the class(java TestFrame and java TestJFrame)
       

       Attachments:
       ------------
       1. TestFrame.java
       2. TestJFrame.java
       *************************************************
       code for TestFrame.java
       
       import java.awt.*;
       class TestFrame {
      public static void main(String args[]) {
      Frame f=new Frame();
      }
       }
       
       *************************************************
       code for TestJFrame.java
       
       import javax.swing.*;
       class TestJFrame {
      public static void main(String args[]) {
      JFrame f=new JFrame();
      }
       }
       
       *************************************************
       

      Attachments

        Activity

          People

            bchristi Brent Christian
            sshakilasunw Shahulhameedmohaideenhaleema Shakila (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: