I am able render a jComboBox as shown in this tutorial:
Netbeans Tutorial
However, I would like to be able to render the jComboBox with data from two different tables (entities) instead of just one.
So say I have the following tables:
CREATE TABLE A (
ID INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
NAME VARCHAR(50),
TYPE VARCHAR(50)
);
CREATE TABLE B (
ID INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
DAYOFWEEK VARCHAR(50),
LENGTH INT
);
In my ComboBox, I want it to display the NAME from TABLE A and the DAYOFWEEK and LENGTH from TABLE B
I was hoping something like the following would work, but it casts a class exception.
Any help or examples would be appreciated.
Thanks in advance
-Kevin