Results 1 to 3 of 3
  1. #1
    RichersooN is offline Senior Member
    Join Date
    Jan 2011
    Location
    Rizal Province, Philippiines
    Posts
    167
    Rep Power
    0

    Default Pls help me, I can't test my JFrame

    Hi All,

    Please help me, I'm trying to run a blank JFrame. But everytime I hit run button in eclipse it always have an error:

    Exception in thread "main" java.lang.ExceptionInInitializerError
    at javax.swing.JPanel.updateUI(Unknown Source)
    at javax.swing.JPanel.<init>(Unknown Source)
    at javax.swing.JPanel.<init>(Unknown Source)
    at javax.swing.JPanel.<init>(Unknown Source)
    at javax.swing.JRootPane.createGlassPane(Unknown Source)
    at javax.swing.JRootPane.<init>(Unknown Source)
    at javax.swing.JFrame.createRootPane(Unknown Source)
    at javax.swing.JFrame.frameInit(Unknown Source)
    at javax.swing.JFrame.<init>(Unknown Source)
    at test.main(test.java:6)
    Caused by: java.lang.IllegalArgumentException: 0 incompatible with Text-specific LCD contrast key
    at java.awt.RenderingHints.put(Unknown Source)
    at sun.awt.windows.WDesktopProperties.getDesktopAAHin ts(Unknown Source)
    at sun.awt.windows.WToolkit.getDesktopAAHints(Unknown Source)
    at sun.awt.SunToolkit.getDesktopFontHints(Unknown Source)
    at sun.awt.windows.WDesktopProperties.getProperties(U nknown Source)
    at sun.awt.windows.WToolkit.updateProperties(Unknown Source)
    at sun.awt.windows.WToolkit.lazilyInitWProps(Unknown Source)
    at sun.awt.windows.WToolkit.lazilyLoadDesktopProperty (Unknown Source)
    at java.awt.Toolkit.getDesktopProperty(Unknown Source)
    at javax.swing.UIManager.<clinit>(Unknown Source)
    ... 10 more

    Here's my code:

    Java Code:
    import javax.swing.JFrame;
    public class test {
    	public static void main(String[]args){
    		JFrame frame = new JFrame();
    		frame.setSize(200,200);
    		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    		frame.setVisible(true);
    	}
    }
    Please help me with my problem..

    Thanks,
    Last edited by RichersooN; 08-23-2012 at 11:41 AM.

  2. #2
    kjkrum's Avatar
    kjkrum is offline Senior Member
    Join Date
    Apr 2011
    Location
    Tucson, AZ
    Posts
    1,060
    Rep Power
    6

    Default Re: Pls help me, I can't test my JFrame

    Get in the habit of using standard Java naming conventions!

  3. #3
    RichersooN is offline Senior Member
    Join Date
    Jan 2011
    Location
    Rizal Province, Philippiines
    Posts
    167
    Rep Power
    0

    Default Re: Pls help me, I can't test my JFrame

    problem solved thanks to you

Similar Threads

  1. Replies: 3
    Last Post: 11-27-2011, 05:18 AM
  2. Replies: 5
    Last Post: 06-14-2010, 06:10 PM
  3. Replies: 6
    Last Post: 04-12-2010, 11:33 AM
  4. Replies: 4
    Last Post: 04-22-2009, 11:02 PM
  5. Replies: 0
    Last Post: 04-05-2008, 12:38 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •