Wondering if anyone could point me in the right direction. I have created a class in Eclipse which basically works out and displays a students timetable. For each timeslot I have created strings which are initialized to "" then changed if necessary.
Now I ran into a variety of problems when trying to create a Swing table in the same class, so made a new visual class and designed it that way. Now, I want to extract the Strings from Timetable.java so I can use them in the Swing table.
I've read up a little on Getters and Setters but wasn't sure I was using them properly. Would this be the right path to go down?
Its a little bit difficult to find out what you want without seeing any code. Anyway if you want to populate a Jtable you want to use a defaultTableModel by passing the timetable data and column names as arrays or implement a adapter for your student timetable by creating a class extending abstractTableModel and feed the JTable with this model.
Thanks for your reply Ben! Even though this a coding forum I always feel like showing all my code would be messy! I'll show my workings for the timeslot values as the table is just a basic Jtable really.
But I will go away and have a bash at what you suggested Ben! ;p