Try using some of these "JButton.buttonType" properties:
{ "segmented", "segmentedRoundRect", "segmentedCapsule",
"segmentedTextured" }
with these "JButton.segmentPosition" properties:
{ "first", "middle", "last", "only" }
These properties are seriously cool, but I can only get them to work
in a standalone application, not our applet (in either Safari or
Camino). It's particularly odd because as a standalone application,
the toolbar has a lighter color (same as the JMenu color), but in
Safari and Camino it's much darker (same as the standard toolbar
color in Safari, Mail etc).
In browsers, the icons always seem to render as rounded rectangles
with a margin between each button. Also, for some reason in browsers
the menubar in our applet has the old stripped look. Both
standalone and the applet is running in Java 1.5.
Looks like applets get a different behavior out of the look and feel
somehow which is really frustrating. They are both definitely using
the same L&F class: Aqua Look and Feel for Mac OS X -
apple.laf.AquaLookAndFeel
public class Scrap extends JApplet {
public void start() {
main(null);
}
public static void main(String args[]) {
JFrame frame = new JFrame();
Container contentPane = frame.getContentPane();
contentPane.setLayout(new BorderLayout());
contentPane.add(createPanel(), BorderLayout.CENTER);
frame.pack();
frame.setVisible(true);
}
static Component createPanel() {
JPanel panel = new JPanel(new FlowLayout());
JButton b = new JButton();
b.putClientProperty("JButton.buttonType", "segmentedTextured");
b.putClientProperty("JButton.segmentPosition", "last");
b.setPreferredSize(new Dimension(80, 30));
panel.add(b);
return panel;
}
}
Perhaps you have some stale applet class caches. Just a thought.
Mike Swingler
Java Frameworks Engineer
Apple Inc.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden