Search in sources :

Example 1 with JColorChooser

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);
}
Also used : JColorChooser(javax.swing.JColorChooser)

Example 2 with JColorChooser

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);
}
Also used : JLabel(javax.swing.JLabel) JColorChooser(javax.swing.JColorChooser)

Example 3 with JColorChooser

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);
}
Also used : JButton(javax.swing.JButton) JColorChooser(javax.swing.JColorChooser)

Example 4 with JColorChooser

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);
}
Also used : JFrame(javax.swing.JFrame) JColorChooser(javax.swing.JColorChooser)

Example 5 with JColorChooser

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));
}
Also used : JColorChooser(javax.swing.JColorChooser) Font(java.awt.Font)

Aggregations

JColorChooser (javax.swing.JColorChooser)34 JDialog (javax.swing.JDialog)14 ActionEvent (java.awt.event.ActionEvent)10 ActionListener (java.awt.event.ActionListener)10 JButton (javax.swing.JButton)10 JLabel (javax.swing.JLabel)9 JPanel (javax.swing.JPanel)9 Color (java.awt.Color)7 JFrame (javax.swing.JFrame)7 AbstractColorChooserPanel (javax.swing.colorchooser.AbstractColorChooserPanel)6 BorderLayout (java.awt.BorderLayout)5 Component (java.awt.Component)5 JTextField (javax.swing.JTextField)5 JCheckBox (javax.swing.JCheckBox)4 JOptionPane (javax.swing.JOptionPane)4 JRadioButton (javax.swing.JRadioButton)4 JScrollPane (javax.swing.JScrollPane)4 Frame (java.awt.Frame)3 WindowAdapter (java.awt.event.WindowAdapter)3 WindowEvent (java.awt.event.WindowEvent)3