aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes please help with LOOK AND FEEL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "please help with LOOK AND FEEL" Watch "please help with LOOK AND FEEL" New topic
Author

please help with LOOK AND FEEL

Ana Mihailescu
Greenhorn

Joined: Apr 26, 2001
Posts: 29
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 !
neel kum
Greenhorn

Joined: Mar 13, 2004
Posts: 1
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)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: please help with LOOK AND FEEL