Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support -Dswing.defaultlaf VM flag #5

Closed
GoogleCodeExporter opened this issue Jul 6, 2015 · 2 comments
Closed

Support -Dswing.defaultlaf VM flag #5

GoogleCodeExporter opened this issue Jul 6, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Compile the attached test class
2. Run it with the following VM flag:
-Dswing.defaultlaf=com.seaglasslookandfeel.SeaGlassLookAndFeel

What is the expected output? What do you see instead?

Expected - frame shown with a button.
Instead: 

Exception in thread "AWT-EventQueue-0" java.lang.ExceptionInInitializerError
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:247)
    at javax.swing.SwingUtilities.loadSystemClass(SwingUtilities.java:1849)
    at javax.swing.UIManager.setLookAndFeel(UIManager.java:561)
    at javax.swing.UIManager.initializeDefaultLAF(UIManager.java:1325)
    at javax.swing.UIManager.initialize(UIManager.java:1414)
    at javax.swing.UIManager.maybeInitialize(UIManager.java:1402)
    at javax.swing.UIManager.getUI(UIManager.java:988)
    at javax.swing.JPanel.updateUI(JPanel.java:109)
    at javax.swing.JPanel.<init>(JPanel.java:69)
    at javax.swing.JPanel.<init>(JPanel.java:92)
    at javax.swing.JPanel.<init>(JPanel.java:100)
    at javax.swing.JRootPane.createGlassPane(JRootPane.java:528)
    at javax.swing.JRootPane.<init>(JRootPane.java:348)
    at javax.swing.JFrame.createRootPane(JFrame.java:255)
    at javax.swing.JFrame.frameInit(JFrame.java:236)
    at javax.swing.JFrame.<init>(JFrame.java:203)
    at com.seaglasslookandfeel.TestFrame.<init>(TestFrame.java:12)
    at com.seaglasslookandfeel.TestFrame$1.run(TestFrame.java:25)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:633)
    at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296
)
    at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
    at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201
)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: java.lang.NullPointerException
    at javax.swing.MultiUIDefaults.getUIError(MultiUIDefaults.java:133)
    at javax.swing.UIDefaults.getUI(UIDefaults.java:741)
    at javax.swing.UIManager.getUI(UIManager.java:997)
    at javax.swing.JPanel.updateUI(JPanel.java:109)
    at javax.swing.JPanel.<init>(JPanel.java:69)
    at javax.swing.JPanel.<init>(JPanel.java:92)
    at javax.swing.JPanel.<init>(JPanel.java:100)
    at javax.swing.JRootPane.createGlassPane(JRootPane.java:528)
    at javax.swing.JRootPane.<init>(JRootPane.java:348)
    at javax.swing.JInternalFrame.createRootPane(JInternalFrame.java:343)
    at javax.swing.JInternalFrame.<init>(JInternalFrame.java:320)
    at javax.swing.JInternalFrame.<init>(JInternalFrame.java:250)
    at
com.seaglasslookandfeel.SeaGlassLookAndFeel.<clinit>(SeaGlassLookAndFeel.java:15
9)
    ... 27 more


What version of the product are you using? On what operating system?

Using the latest SVN head on Mac 1.6.0_17 VM.


Original issue reported on code.google.com by kirill.grouchnikov@gmail.com on 5 Jan 2010 at 1:03

Attachments:

@GoogleCodeExporter
Copy link
Author

Okay, I can replicate that. I'll look into it. Thanks!

Original comment by kahuxtable on 6 Jan 2010 at 3:19

  • Changed state: Started

@GoogleCodeExporter
Copy link
Author

Fixed in r669.

The problem was that I was faking out Synth's region/style calculations for the 
internal frame title pane by 
having a static internal frame that I would substitute for the parent when 
doing the comparisons. This doesn't 
work if the UI has been assigned on the command line because the UI hasn't been 
initialized when the 
internal frame is created.

I could have fixed this by assigning the static FAKE_INTERNAL_FRAME when it is 
first needed, but I decided to 
simply test if the region pattern is looking for an internal frame and 
reporting one found.

Original comment by kahuxtable on 6 Jan 2010 at 5:29

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant