Im a complete Java newbie I have programmed in C++ and other languages before, I have JBuilder 6 to compile my work. Im building a small applet for a project, the applet will accept RGB values and display the colour on screen, very very simple I had imagined. I know i can do it via the colourchooser but I don't want to use that.
Originally I had planned to three textfields one for red, one for green etc. The user would enter an integer (max 255) the value would be assigned to defined integer variable and that would be fine. I soon realised java stored data entered through a textfield as a string. I used the convert function to convert the string into an integer.
I wanted these three integers used in creating a new colour: cmdCustomColour.setBackground(new Color(int iRed, int iGreen, int iBlue));
But this isn't possible either, I get a load of error messages.
I have quite a few questions to ask, but would someone mind advising me on this one first?
What is the best way to accept the input of the integers? Is it possible to use my method above? Would I be best using a scroll bar?