• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ?
 
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic