I am hoping that some of the gurus on here can point me in the right direction. I'm fairly new to java and what I'm trying to do is create three combo boxes and assign various value to them. I was hoping to achieve it using arrays and for loops but I've run into a problem. Is it actually possible to do? Here is my code so far:
The error so far is with the line
- No suitable constructor found for JComboBox(String)
I know I still have to create a frame and add the panel to it etc, but can anyone tell me where I'm going wrong and if creating an array of combo boxes, and assigning an array of strings to it, is possible in 'For loops'?
Thank you Ashish....it seems the problem was I wasn't comparing like with like on that line. It appears that I can just pass the complete row instead of specifying row and column and therefore only need one 'For' loop. Here is the amended working code: