look and feel, you can see the shadow effect of JPopupMenu:
The shadow makes the popup menu looks like a real floating object, attracts
users to put focus on it. Today let's see how to implement it in Synth look
Please pay attention to the enlarged view of shadow area, the shadow is not
covering the background completely, it is alpha-transparent instead. So we can...
on Mar 11, 2009
Customizing the JComboBox style in Synth look and feel is a little complex,
I can write a long article for it, but I don't want to be too tired, so please
let me share my experience piece by piece. Today let's see how to customize
the cell renderer for drop-down list in JComboBox.
Can we just do nothing and let the Synth look and feel to handle it in default
way? Unfortunately it does not...
on Feb 19, 2009
The style binding mechanism is another great feature of Synth
look and feel. By using style binding, you can define several button styles
within the same look and feel (one as default button style and the others are
candidates), the final user can decide which style can be applied on which button.
How could Synth achieve this? The answer is hidden in the bind
node in XML. Let's make an...
on Feb 4, 2009
If you want to deliver your Synth based look and feel, packaging it as a jar
file will be a good idea. There are different structures for different look
and feel packages, here I will introduce the one from EaSynth
look and feel.
To ease the usage of the new look and feel, it is better to create a new look
and feel class, which is extended from javax.swing.plaf.synth.SynthLookAndFeel....
on Feb 1, 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
on Jan 30, 2009
As we know, Synth look and feel can be customized with an XML file which satisfies
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:
Actually the idref is the most important one, since it is
a type that represent a reference of object, which may be the...
on Jan 28, 2009
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.
<font color="#0000FF"> final JTabbedPane tabbedPane = new JTabbedPane();<br> tabbedPane.addTab("Tab1", new JLabel("Text Component 1"));<...
on Jan 27, 2009
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
on Jan 26, 2009