use of javax.swing.JColorChooser in project jdk8u_jdk by JetBrains.
the class Test6707406 method test.
private static void test() {
JColorChooser chooser = new JColorChooser();
chooser.getUI().uninstallUI(chooser);
new Test6707406().installUI(chooser);
chooser.getSelectionModel().setSelectedColor(Color.BLUE);
}
use of javax.swing.JColorChooser in project jdk8u_jdk by JetBrains.
the class Test6977726 method init.
public void init() {
JColorChooser chooser = new JColorChooser();
chooser.setPreviewPanel(new JLabel("Text Preview Panel"));
getContentPane().add(chooser);
}
use of javax.swing.JColorChooser in project jdk8u_jdk by JetBrains.
the class Test6348456 method init.
@Override
public void init() {
JButton button = new JButton("Swap models");
button.addActionListener(this);
this.chooser = new JColorChooser(Color.RED);
this.chooser.setSelectionModel(WHITE);
add(BorderLayout.NORTH, button);
add(BorderLayout.CENTER, this.chooser);
}
use of javax.swing.JColorChooser in project jdk8u_jdk by JetBrains.
the class Test7194184 method run.
public void run() {
String title = getClass().getName();
frame = new JFrame(title);
colorChooser = new JColorChooser();
frame.add(colorChooser);
frame.pack();
frame.setVisible(true);
}
use of javax.swing.JColorChooser in project jdk8u_jdk by JetBrains.
the class Test4887836 method init.
public void init() {
// NON-NLS: property and font names
UIManager.put("Label.font", new Font("Perpetua", 0, 36));
add(new JColorChooser(Color.LIGHT_GRAY));
}
Aggregations