Hi!
The MacOsX-LF in Java is behaving strangely... I have an app that includes a JTree. I add a custom cell renderer to display custom leaf nodes. These custom components are complex JPanels (code below).
Now, when I run the app with metal-LF, the leaf nodes get painted correctly. When I run it with MacOsX-LF, the leaf node's height gets computed incorrectly (way too narrow), and the components within the leaf node get painted on top of each other.
Does anybody have a suggestion of what I could do?
Greetings,
Dunk
-----------------
<BLOCKQUOTE><font size="1"face="Geneva, Verdana, Arial">code:</font><HR><pre><font size=1 face=courier>
public class FDInfoPanel extends JPanel {
private JLabel titleLabel;
private JPanel panel1 = new JPanel(new BorderLayout());
private JPanel panel2 = new JPanel(new BorderLayout());
private JLabel label1;
private JLabel label2;
private JComboBox box1;
private JComboBox box2;
public FDInfoPanel(String title, String labString1, String labString2,
String[] objList, int goal1, int goal2) {
titleLabel = new JLabel(title);
label1 = new JLabel(labString1);
label2 = new JLabel(labString2);
box1 = new JComboBox(objList);
box2 = new JComboBox(objList);
this.setLayout(new BorderLayout());
panel1.add(label1, BorderLayout.WEST);
panel1.add(box1, BorderLayout.EAST);
panel2.add(label2,BorderLayout.WEST);
panel2.add(box2, BorderLayout.EAST);
this.add(titleLabel, BorderLayout.NORTH);
this.add(panel1, BorderLayout.CENTER);
this.add(panel2, BorderLayout.SOUTH);
}
...
}
</font>[/code]
