wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes Problem with custom look and feel implementation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Problem with custom look and feel implementation" Watch "Problem with custom look and feel implementation" New topic
Author

Problem with custom look and feel implementation

Jelle Vandebeeck
Greenhorn

Joined: Dec 08, 2008
Posts: 1
I have a problem with my custom look and feel definition of the LabelUI component.

This is my custom LookAndFeel implementation class:


This is the LabelUI implementation class:


This is the main class that sets the components and the look and feel:


The problem is that I never seem to be entering the paintEnabledText() method of TestLabelUI, instead it still goes to the paintEnabledText() of the BasicLabelUI class. Although I instruct to go to the TestLabelUI in the TestLookAndFeel class...

Can anybody explain what I'm doing wrong?

Thnx!!
Brian Cole
Author
Ranch Hand

Joined: Sep 20, 2005
Posts: 862
Originally posted by Jelle Vandebeeck:





You need to call this method createUI, not createU.

Also, you probably want to call super.initClassDefaults(table) in initClassDefaults() before you call table.putDefaults(defaults).


bitguru blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with custom look and feel implementation
 
Similar Threads
JLabel: Code for background-painting
blinking tab pane
scrollbar and image
Vertical JLable
update the JVM from 1.5 to 1.6, JDialog background cant paint