java - Why doesn't my JFrame repaint when I set a new Synthetica theme? -


i set applications theme synthetica alu oxide reason jframe doesn't repaint synthetica theme repaint jframe.

this mine looks like.

http://i.imgur.com/sobdts4.png

this suppose like.

http://www.jyloo.com/images/screenshots/syntheticaaluoxide/democenter2.png

    public mainpanel() {     jframe frame = new jframe();     frame.settitle("asteria 3.0 npc definition editor");      try {         uimanager.setlookandfeel(new syntheticaaluoxidelookandfeel());     } catch (unsupportedlookandfeelexception e) {         // todo auto-generated catch block         e.printstacktrace();     } catch (parseexception e) {         // todo auto-generated catch block         e.printstacktrace();     }      components();            frame.setjmenubar(menubar);     jtabbedpane tab = new jtabbedpane();     tab.addtab("information", informationtab());      tab.addtab("bonuses", bonustab());     tab.addtab("animation", animtab());     tab.addtab("property", propertiestab());     tab.addtab("miscellaneous", misctab());       frame.getcontentpane().add(tab);     //frame.add(this);     frame.setsize(500, 600);     frame.setresizable(false);     frame.setdefaultcloseoperation(jframe.exit_on_close);     frame.setvisible(true);      } 

swing gui objects should constructed , manipulated only on event dispatch thread, after you've invoked uimanager.setlookandfeel().

try {     uimanager.setlookandfeel(new syntheticaaluoxidelookandfeel()); } catch (unsupportedlookandfeelexception e) {     e.printstacktrace(); } catch (parseexception e) {     e.printstacktrace(); } eventqueue.invokelater(new runnable() {     public void run() {         jframe frame = new jframe();         …         frame.pack(true);         frame.setvisible(true);     } }); 

Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

php - Find a regex to take part of Email -