Meaningless Drivel is fun!*
The moose likes Swing / AWT / SWT and the fly likes Look and feel with Custom UI delegate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Look and feel with Custom UI delegate" Watch "Look and feel with Custom UI delegate" New topic

Look and feel with Custom UI delegate

Ganesha Kumar
Ranch Hand

Joined: May 04, 2006
Posts: 56
Hi all,
I am unable to understand how Swing works when you have look and feel and you are having a custom ComponentUI for a component. Here is the sample code:

In this example, if a look and feel is set in the beginning and after that a custom UI is set for TextField(MyTextUI), the custom UI is taking the priority. If Look and Feel is set later, the look and feel will override the custom UI. I want know to what is the appropriate way to create custom ui. Should one always create Look and feel set for all the components and set it to the UIManager. What if I want to have custom look and feel only for a few components?

It is sorta covered in the JavaRanch Style Guide.
subject: Look and feel with Custom UI delegate