• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Please help:UIDefaults.getUI() failed: no ComponentUI class for: javax.swing.JMenuBar

 
kwwong wong
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I using JBuilder to pack the application in executable jar file. When run the program, it through the following errors on JMenuBar, JMenu, JPasswordField and JButton:
UIDefaults.getUI() failed: no ComponentUI class for: javax.swing.JMenuBar[,0,0,0x0,invalid,alignmentX=null,alignmentY=null,border=,flags=0,maximumSize=,minimumSize=,preferredSize=,margin=,paintBorder=true]
java.lang.Error
at javax.swing.UIDefaults.getUIError(Unknown Source)
at javax.swing.UIDefaults.getUI(Unknown Source)
at javax.swing.UIManager.getUI(Unknown Source)
at javax.swing.JMenuBar.updateUI(Unknown Source)
at javax.swing.JMenuBar.<init>(Unknown Source)
at team6.inv.gui.MainFrame.<init>(MainFrame.java:19)
at team6.inv.gui.MainApplication.<init>(MainApplication.java:24)
at team6.inv.gui.MainApplication.main(MainApplication.java:57)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.javaws.Launcher.executeApplication(Unknown Source)
at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
at com.sun.javaws.Launcher.continueLaunch(Unknown Source)
at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)
at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)
at com.sun.javaws.Launcher.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
UIDefaults.getUI() failed: no ComponentUI class for: javax.swing.JMenu[,0,0,0x0,invalid,alignmentX=null,alignmentY=null,border=,flags=0,maximumSize=,minimumSize=,preferredSize=,defaultIcon=,disabledIcon=,disabledSelectedIcon=,margin=null,paintBorder=false,paintFocus=false,pressedIcon=,rolloverEnabled=false,rolloverIcon=,rolloverSelectedIcon=,selectedIcon=,text=]
java.lang.Error
at javax.swing.UIDefaults.getUIError(Unknown Source)
at javax.swing.UIDefaults.getUI(Unknown Source)
What is the problem ?
 
kyle amburn
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you try to set a different look and feel? The error is stating that there is no UI delegate for the component. This means that some loook and feel either fails to, or is pointing to a non existenet ComponentUI.
Kyle
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic