I’ve scoured the internet looking for bits and pieces of a solution to my problem, but I haven’t seemed to come up with anything yet, and I’ve really been struggling to solve this.
In short, I need to create a JDialog that embeds a JTable. This JTable has to be dynamic in regards to its amount of columns. Also, I’d like the first two rows of the JTable to have combo boxes in each of their cells. Row one all has the same combo box, and row two all has the same combo box, different from row one. From there, I’m just filling in static text data for a set number of other rows. So the table should be of the form:
combo, combo, combo, combo, …
combo, combo, combo, combo, …
text, text, text, text, …
I’m having a lot of trouble a) making the column number dynamic (it will depend on an array passed) and b) making just the first two rows combo boxes – the only way I can find anywhere makes an entire column combo boxes.
If it helps at all, I’m using Netbeans IDE. Thank you very much in advance for your time, and if any further knowledge is needed, just let me know.
1 Answer