apple.awt.brushMetalLook client property not honoured in OpenJDK 1.7.0_04
Steve McLeod
steve.mcleod at gmail.com
Fri Apr 20 10:36:31 PDT 2012
(Sorry for the cross-post; I accidentally posted originally to the wrong list)
I have this self-contained code example:
import javax.swing.*;
import java.awt.*;
public class ScratchSpace {
public static void main(String[] args) {
System.out.println("javaVersion = " + System.getProperty("java.version"));
JToolBar toolBar = new JToolBar();
toolBar.setFloatable(false);
toolBar.add(new JButton("Dummy"));
JPanel contentPane = new JPanel(new BorderLayout());
contentPane.add(toolBar, BorderLayout.NORTH);
contentPane.add(new JTextArea(20, 20), BorderLayout.CENTER);
JFrame frame = new JFrame();
frame.getRootPane().putClientProperty("apple.awt.brushMetalLook", Boolean.TRUE);
frame.setContentPane(contentPane);
frame.pack();
frame.setLocationRelativeTo(null);
frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
frame.setVisible(true);
}
}
In Apple's Java 6 on Lion, this gives me a "unified tool bar" appearance.
On OpenJDK 1.7.0_04, I don't get the unified tool bar appearance. Instead the toolbar is a distinct different colour from the window title bar.
Regards,
Steve
---------------------------------------------------
Steve McLeod
Founder, Poker Copilot
http://www.pokercopilot.com
More information about the macosx-port-dev
mailing list