In the code below, you see that some columns are excluded because they will not be needed somewhere
in my program (and somewhere else they are needed).
I would like to make a universal method so that it can be reused. But when I map these objects
to JTable using the constructor of DefaultTableModel, they somehow would include all columns that
are queried. Can I just exclude some of them to suit the JTable model where appropriate?
Would it better to not get those unused data from the Employee? The table model having the complete data from the table is somewhat a good thing because you never know when what is needed and when it's not needed.
To keep things simple I think you can keep getting all the columns for Employee class. But in the table model just get the attributes you need (eg overriding the getColumn() if I remembered correctly).
Since this is getting towards more Swing stuff, I shall move to that forum.