jcc.setPreviewPanel(ok.getTransparancyAdjustment(initColor.getAlpha()));
JComponent previewPanel = ok.getTransparancyAdjustment(initColor.getAlpha()); previewPanel.setSize(previewPanel.getPreferredSize()); previewPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 1, 0)); jcc.setPreviewPanel(previewPanel);
    public static Color showDialog(Component component, String title,                                   Color startingColor) {        Color initColor = startingColor != null ? startingColor : Color.white;        final JColorChooser jcc = new JColorChooser(initColor);        ColorTracker ok = new ColorTracker(jcc);        jcc.getSelectionModel().addChangeListener(ok);        jcc.setPreviewPanel(ok.getTransparancyAdjustment(initColor.getAlpha()));        JDialog colorDialog = JColorChooser.createDialog(component,                title,                true,                jcc,                ok,                null);        colorDialog.show();        return ok.getColor();    }