Eccomi qua, sono andato avanti a scrivere e sono molto vicino ad ottenere l'effetto desiderato.
Posto subito il codice completo:


codice:
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.border.*;
import javax.swing.colorchooser.AbstractColorChooserPanel;
import javax.swing.event.*;
import javax.swing.JSpinner.NumberEditor;
import javax.swing.text.*;
public class ColorChooserDemo extends JFrame
{
    private JColorChooser colorChooser;
	private BottomPanel bottomPanel;
    public ColorChooserDemo()
	{
		super("Color Chooser Demo");
		setDefaultCloseOperation(EXIT_ON_CLOSE);
		setResizable(false);
		Container pane=getContentPane();
		pane.setBackground(Color.WHITE);
		/** Creating a custom JColorChooser in a try-catch block, if something goes wrong a standard one will be created */
		try
		{
			Color defaultColor=new Color(114,226,226);
			colorChooser=new JColorChooser(defaultColor);
			AbstractColorChooserPanel panelHSV=null;
			AbstractColorChooserPanel[] oldPanels=colorChooser.getChooserPanels(),newPanels=new AbstractColorChooserPanel[1];
			for(int i=0;i<oldPanels.length;i++)
			{
				AbstractColorChooserPanel oldPanel=oldPanels[i];
				if(oldPanel.getDisplayName().equals("HSV"))panelHSV=newPanels[0]=oldPanel;
			}
			colorChooser.setChooserPanels(newPanels);
			((JComponent)((JComponent)panelHSV.getParent()).getParent()).setBackground(Color.WHITE);
			panelHSV.setBackground(Color.WHITE);
			// Removing ColorPanel component from ColorChooserPanel, only diagrams will be visible
			Component[] internalComponents=panelHSV.getComponents();
			for(int i=0;i<internalComponents.length;i++)
			{
				Component c=internalComponents[i];
				if(c.getClass().getName().equals("javax.swing.colorchooser.ColorPanel"))
				{
					Container colorPanel=(Container)c;
					for(int j=0;j<colorPanel.getComponentCount();j++)
					{
						Component child=colorPanel.getComponent(j);
						// Setting the third JRadioButton selected (the "Value" one)
						if(child instanceof JRadioButton)
						{
							((JRadioButton)colorPanel.getComponent(j+2)).doClick();
							break;
						}
					}
					colorPanel.setVisible(false);
				}
			}
			// Setting diagrams borders and listeners
			DiagramListener listener=new DiagramListener();
			JComponent firstDiagram=(JComponent)internalComponents[internalComponents.length-2],secondDiagram=(JComponent)internalComponents[internalComponents.length-1];
			firstDiagram.addMouseListener(listener);
			firstDiagram.addMouseMotionListener(listener);
			secondDiagram.addMouseListener(listener);
			secondDiagram.addMouseMotionListener(listener);
			firstDiagram.setBorder(new CompoundBorder(new EmptyBorder(0,4,0,4),new LineBorder(Color.GRAY)));
			secondDiagram.setBorder(new LineBorder(Color.GRAY));
			// removing previous preview panel and adding a new one
			colorChooser.setPreviewPanel(new JPanel());
			pane.add(bottomPanel=new BottomPanel(defaultColor),BorderLayout.SOUTH);
		}
		catch(Exception ex){
			colorChooser=new JColorChooser();
		}
		pane.add(colorChooser,BorderLayout.NORTH);
		pack();
		setLocationRelativeTo(null);
    }
	private class DiagramListener implements MouseListener,MouseMotionListener
	{
		public void mouseDragged(MouseEvent e){
			bottomPanel.setLabelValues();
			bottomPanel.getPreviewPanel().repaint();
		}
		public void mousePressed(MouseEvent e){
			bottomPanel.setLabelValues();
			bottomPanel.getPreviewPanel().repaint();
		}
		public void mouseClicked(MouseEvent e){}
		public void mouseReleased(MouseEvent e){}
		public void mouseEntered(MouseEvent e){}
		public void mouseExited(MouseEvent e){}
		public void mouseMoved(MouseEvent e){}
	}
	private class BottomPanel extends JPanel
	{
		private Color oldColor;
		private JFormattedTextField red,green,blue;
		private JPanel previewPanel;
		public BottomPanel(Color color)
		{
			super(new BorderLayout());
			oldColor=color;
			if(oldColor==null)oldColor=Color.WHITE;
			Font labelFont=new Font("Arial",0,11);
			JLabel redLabel=new StyledLabel("Red :",labelFont),greenLabel=new StyledLabel("Green :",labelFont),blueLabel=new StyledLabel("Blue :",labelFont);
			Dimension preferred=greenLabel.getPreferredSize();
			redLabel.setPreferredSize(preferred);
			blueLabel.setPreferredSize(preferred);
			JPanel labelsPanel=new JPanel(new BorderLayout());
			labelsPanel.add(labelledSpinnerPanel(redLabel,oldColor.getRed(),1),BorderLayout.NORTH);
			labelsPanel.add(labelledSpinnerPanel(greenLabel,oldColor.getGreen(),2),BorderLayout.CENTER);
			labelsPanel.add(labelledSpinnerPanel(blueLabel,oldColor.getBlue(),3),BorderLayout.SOUTH);
			add(labelsPanel,BorderLayout.WEST);
			add(previewPanel=new PreviewPanel(),BorderLayout.CENTER);
		}
		public void changeColor()
		{
			colorChooser.setColor(new Color((int)red.getValue(),(int)green.getValue(),(int)blue.getValue()));
			previewPanel.repaint();
		}
		public JPanel getPreviewPanel()
		{
			return previewPanel;
		}
		public JPanel labelledSpinnerPanel(JLabel label,int initialValue,int order)
		{
			JPanel panel=new JPanel(new FlowLayout(FlowLayout.LEFT,10,5));
			panel.setBackground(Color.WHITE);
			panel.add(label);
			JSpinner spinner=new JSpinner(new SpinnerNumberModel(initialValue,0,255,1));
			spinner.setBorder(new LineBorder(Color.GRAY));
			spinner.addChangeListener(new SpinnerListener());
			JFormattedTextField field=((NumberEditor)spinner.getEditor()).getTextField();
			if(order==1)red=field;
			else if(order==2)green=field;
			else blue=field;
			field.setFormatterFactory(new DefaultFormatterFactory(new Formatter(field)));
			field.setPreferredSize(new Dimension(25,18));
			panel.add(spinner);
			return panel;
		}
		public void setLabelValues()
		{
			Color selected=colorChooser.getColor();
			red.setValue(selected.getRed());
			green.setValue(selected.getGreen());
			blue.setValue(selected.getBlue());
		}
		private class Formatter extends DefaultFormatter
		{
			DocumentFilter filter;
			JFormattedTextField field;
			public Formatter(JFormattedTextField field)
			{
				this.field=field;
				filter=new Filter();
			}
			protected DocumentFilter getDocumentFilter()
			{
				return filter;
			}
			private class Filter extends DocumentFilter
			{
				public void replace(FilterBypass fb,int offset,int length,String text,AttributeSet attrs)throws BadLocationException
				{
					Document document=fb.getDocument();
					String oldText=document.getText(0,document.getLength()),newText=oldText.substring(0,offset)+text+oldText.substring(offset+length);
					try{
						int value=Integer.valueOf(newText);
						if(value>=0&&value<=255)
						{
							super.replace(fb,offset,length,text,attrs);
							changeColor();
						}
					}
					catch(NumberFormatException e){
						Toolkit.getDefaultToolkit().beep();
					}
				}
				public void remove(FilterBypass fb,int offset,int length)throws BadLocationException
				{
					Document document=fb.getDocument();
					String text=document.getText(0,document.getLength());
					if(text.length()-length==0)field.setValue(0);
					else super.remove(fb,offset,length);
					changeColor();
				}
			}
		}
		private class PreviewPanel extends JPanel
		{
			public PreviewPanel()
			{
				setBackground(Color.WHITE);
			}
			protected void paintComponent(Graphics g)
			{
				super.paintComponent(g);
				g.setColor(Color.GRAY);
				g.drawRect(20,20,51,51);
				g.setColor(oldColor);
				g.fillRect(21,21,50,25);
				g.setColor(colorChooser.getColor());
				g.fillRect(21,46,50,25);
			}
		}
		private class SpinnerListener implements ChangeListener
		{
			public void stateChanged(ChangeEvent e){
				changeColor();
			}
		}
		private class StyledLabel extends JLabel
		{
			public StyledLabel(String text,Font f)
			{
				super(text,RIGHT);
				setFont(f);
			}
		}
	}
	public static void main(String[] a)
	{
		SwingUtilities.invokeLater(new Runnable(){
            public void run(){
                new ColorChooserDemo().setVisible(true);
            }
        });
    }
}

Ed ecco un'immagine di come appare il frame su windows 7:

ColorChooser.jpg


Vorrei qualche consiglio su come migliorare il codice usato, in particolare su questi punti (ma qualsiasi osservazione è bene accetta) :


- Il difetto/carenza principale che riscontro finora è la corrispondenza tra i valori degli RGB presenti nei JFormattedTextField e l'aggiornarsi del colore del JColorChooser.
Infatti trascinando il cursore sul diagramma o utilizzando i bottoncini del JSpinner il colore si aggiorna sempre, mentre digitando le cifre sul JFormattedTextField questo non avviene sempre.
Eppure il metodo richiamato è sempre lo stesso... Come posso sincronizzare meglio tutti i vari cambiamenti?
- Va bene la parte riguardante il filtro dei JFormattedTextField e la creazione del colorchooser customizzato? Per il color chooser il ciclo interno di selezione dei componenti potrebbe non essere il massimo, spero che inserire il tutto in un blocco try-catch e creare un JColorChooser standard in caso di errore sia sufficiente.
- Come valutate l'incapsulamento delle varie classi private?