给老兄改完啦。
首先SwingColorControls的构造函数是public SwingColorControls(SwingColorTest parent,String[] label),不是void SwingColorControls(SwingColorTest parent,String[] label)。其次Color.RGBtoHSB返回一个float[]的引用不需要用new。最后不是String.ValueOf而是String.valueOf.
import java.awt.event.*;
import javax.swing.*;
import java.awt.*;
import java.lang.*;
public class SwingColorTest extends JFrame {
  SwingColorControls RGBcontrols,HSBcontrols;
  JPanel swatch;
  public SwingColorTest() {
   super("zhang");
JPanel pane = new JPanel();
pane.setLayout(new GridLayout(1,3,5,15));
swatch = new JPanel();
swatch.setBackground(Color.black);
String[] rgblabels = {"Red","Green","Blue"};
RGBcontrols = new SwingColorControls(this,rgblabels);
String[] hsblabels = {"Hue","Saturation","Brightnesss"};
HSBcontrols = new SwingColorControls(this,hsblabels);
pane.add(swatch);
pane.add(RGBcontrols);
pane.add(HSBcontrols);
setContentPane(pane);
setVisible(true);
setDefaultCloseOperation(EXIT_ON_CLOSE);
  }
  
  public static void main(String[] arg) {
SwingColorTest frame = new SwingColorTest();
  }
  
  public Insets getInsets() {
return new Insets(10,10,10,10);
  }  void update(SwingColorControls control) {
Color c;
int[] value = new int[3];
for (int i=0;i<3;i++){
value[i] = Integer.parseInt(control.tfield[i].getText());
if(value[i]<0||value[i]>255){
value[i] = 0;
control.tfield[i].setText(" " + value[i]);
}}
if (control == RGBcontrols){
c = new Color(value[0],value[1],value[2]);
float[] HSB = Color.RGBtoHSB(value[0],value[1],value[2],(new float[3]));
HSB[0] *= 360;
HSB[1] *= 100;
HSB[1] *= 100;
for(int i = 0;i<3;i++){
HSBcontrols.tfield[i].setText(String.valueOf((int)HSB[i]));
}
}
else{c = Color.getHSBColor((float)value[0]/360,(float)value[1]/360,(float)value[2]/360);
RGBcontrols.tfield[0].setText(String.valueOf(c.getRed()));
RGBcontrols.tfield[1].setText(String.valueOf(c.getGreen()));
RGBcontrols.tfield[2].setText(String.valueOf(c.getBlue()));
}
  swatch.setBackground(c);
  swatch.repaint();
  }
}class SwingColorControls extends JPanel implements ActionListener,FocusListener {
  SwingColorTest frame;
  JTextField[] tfield = new JTextField[3];
  
  public SwingColorControls(SwingColorTest parent,String[] label) {
frame = parent;
setLayout(new GridLayout(3,2,10,10));
for(int i =0;i<3;i++) {
tfield[i] = new JTextField("0");
tfield[i].addFocusListener(this);
tfield[i].addActionListener(this);
add(new JLabel(label[i],JLabel.RIGHT));
add(tfield[i]);
}
  }  public Insets getInsets() {
return(new Insets(10,10,0,0));
  }  public void actionPerformed(ActionEvent evt) {
if(evt.getSource() instanceof JTextField)
frame.update(this);
  }  public void focusLost(FocusEvent evt) {
frame.update(this);
  }  public void focusGained(FocusEvent evt) {}}