Win a copy of Rust Web Development this week in the Other Languages forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

please help with LOOK AND FEEL

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
I have a strage problem with a look and feel.
I have my own look and feel class, and when I update de UI for a tabbed pane component, I get very strange exceptions. The most strage thing is that a long time worked, and now doesn't work anymore.
Here is the piece of code where I change the look and feel:
try {
com.ls.treasury.ChatLookAndFeel.ChatLookAndFeel otto= new com.ls.treasury.ChatLookAndFeel.ChatLookAndFeel();
UIManager.setLookAndFeel(otto);
jTabbedPane1.updateUI();

} catch (Exception ex) {
System.err.println ("Could not swap LookAndFeel: ChatLNF");
ex.printStackTrace();
}
And this is the error that I get in the Java Console:
UIDefaults.getUI() failed: no ComponentUI class for: javax.swing.JTabbedPane[,10,20,500x320,layout=javax.swing.plaf.metal.MetalTabbedPaneUI$TabbedPaneLayout,alignmentX=null,alignmentY=null,border=,flags=1408,maximumSize=,minimumSize= ,preferredSize=,haveRegistered=false,tabPlacement=TOP]
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.JTabbedPane.updateUI(Unknown Source)
at com.ls.treasury.applets.ChatFrame.<init>(ChatFrame.java:167)
What could it be ? Please help !
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did you find what happened
I am also finding the same problem ....urgent...
UIDefaults.getUI() failed: no ComponentUI class for: javax.swing.JScrollPane$ScrollBar[,0,0,0x0,invalid,alignmentX=null,alignmentY=null,border=,flags=1,maximumSize=,minimumSize=,preferredSize=,blockIncrement=10,orientation=VERTICAL,unitIncrement=1]
java.lang.Error
at javax.swing.UIDefaults.getUIError(UIDefaults.java:389)
at javax.swing.UIDefaults.getUI(UIDefaults.java:419)
at javax.swing.UIManager.getUI(UIManager.java:561)
at javax.swing.JScrollBar.updateUI(JScrollBar.java:184)
at javax.swing.JScrollBar.<init>(JScrollBar.java:135)
at javax.swing.JScrollBar.<init>(JScrollBar.java:150)
at javax.swing.JScrollPane$ScrollBar.<init>(JScrollPane.java:630)
at javax.swing.JScrollPane.createVerticalScrollBar(JScrollPane.java:775)
at javax.swing.JScrollPane.<init>(JScrollPane.java:237)
at javax.swing.plaf.basic.BasicComboPopup.createScroller(BasicComboPopup.java:357)
at javax.swing.plaf.basic.BasicComboPopup.<init>(BasicComboPopup.java:228)
at javax.swing.plaf.metal.MetalComboBoxUI$MetalComboPopup.<init>(MetalComboBoxUI.java:357)
at javax.swing.plaf.metal.MetalComboBoxUI.createPopup(MetalComboBoxUI.java:58)
at javax.swing.plaf.basic.BasicComboBoxUI.installUI(BasicComboBoxUI.java:113)
at javax.swing.plaf.metal.MetalComboBoxUI.installUI(MetalComboBoxUI.java:42)
at javax.swing.JComponent.setUI(JComponent.java:317)
at javax.swing.JComboBox.setUI(JComboBox.java:161)
at javax.swing.JComboBox.updateUI(JComboBox.java:170)
at javax.swing.JComboBox.init(JComboBox.java:137)
at javax.swing.JComboBox.<init>(JComboBox.java:102)
at tradingscreen.client.gui.root.TSClock.<init>(TSClock.java:57)
at tradingscreen.client.gui.root.TSClock.getTSClock(TSClock.java:92)
at tradingscreen.client.gui.TSMenuPanel.setupStatusPanel(TSMenuPanel.java:166)
at tradingscreen.client.gui.TSMenuPanel.<init>(TSMenuPanel.java:66)
at tradingscreen.client.gui.TSApplicationManager.<init>(TSApplicationManager.java:180)
at tradingscreen.client.gui.TSApplicationManager.getInstance(TSApplicationManager.java:128)
at tradingscreen.client.TradingScreenApp.initTsApplicationManager(TradingScreenApp.java:214)
at tradingscreen.client.TradingScreenApp.initApp(TradingScreenApp.java:171)
at tradingscreen.client.TradingScreenApp.<init>(TradingScreenApp.java:112)
at tradingscreen.client.TradingScreenApp.main(TradingScreenApp.java:461)
at test.client.testhelpers.LoginTestHelper.initApp(LoginTestHelper.java:49)
at test.testscripting.engine.RunnableScript.testRun(RunnableScript.java:28)
at java.lang.reflect.Method.invoke(Native Method)
at junit.extensions.jfcunit.JFCTestCase$1.run(Unknown Source)
at junit.extensions.jfcunit.JFCTestCase$4.run(Unknown Source)
at java.lang.Thread.run(Thread.java:479)
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic