DoubleColor.java Source code

Java tutorial

Introduction

Here is the source code for DoubleColor.java

Source

import java.awt.BorderLayout;

import javax.swing.JColorChooser;
import javax.swing.JFrame;

public class DoubleColor {
    public static void main(String args[]) {
        JFrame frame = new JFrame("Double Color Choosers");
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

        JColorChooser left = new JColorChooser();
        left.setDragEnabled(true);
        frame.add(left, BorderLayout.WEST);
        JColorChooser right = new JColorChooser();
        right.setDragEnabled(true);
        frame.add(right, BorderLayout.EAST);

        frame.pack();
        frame.setVisible(true);
    }
}