Blog Archive for xuanyun during January 2009
Synth look and feel allow us to implement our own painter classes to render
the components, that is very good since we can draw anything in our painter
class. But painter class is still a Java class, we need to compile it every
time once we need to change a little details in the class, so it is better to
design a painter class that can accept parameters, which can be easily changed...
As we know, Synth look and feel can be customized with an XML file which satisfies
the Synth
XML format. After we go through the document, we can conclude that the type
of property in the XML can be one of the following:
idref
boolean
dimension
insets
integer
string
Actually the idref is the most important one, since it is
a type that represent a reference of object,...
The JTabbedPane class has not provided an API to set the tab size, but sometimes
we do need this, we can find some ways to work arround.
First of all I create a JTabbedPane component with four tabs.
final JTabbedPane tabbedPane = new JTabbedPane(); tabbedPane.addTab("Tab1", new JLabel("Text Component 1")); tabbedPane.addTab("Tab2", new JLabel("Text Component...
Several years ago, when we talk about designing look and feel, we know it is about implementing different UI classes for different components.
Today since we are using JRE5 or above, we can use Synth look and feel, which
allow us to customize the look and feel by writing an XML file. Synth look and
feel provides some XML elements to define the painters for rendering the swing...



