First I have implemented this class ColorValueSliderControl as described in this link ColorValueSliderControl
Now I have would like to return the values of this method of the Class TColor to another separated independant class
public class ColorValueSliderControl extends JFrame {
public ColorValueSliderControl() {
getContentPane().add(new TColor());
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setSize(500, 500);
setVisible(true);
}
/* Not needed
public static void main(String arg[]) {
new ColorValueSliderControl();
}*/
}
class TColor extends JPanel {
......
//I want to return the result of this method to another class
public Color setBackgroundColor() {
float [] colors = new float[3];
color = new Color(redValue, greenValue, blueValue, alphaValue);
return(color);
......
}
Thank you