Hello, I have the URLyBird assignment, and I decided to create a "HotelRoom" bean since:
although the hope is that this interim step will give them a starting point for migrating the system to the web
. It seems logical to have some decent data structures for the later migration.
The problem is when I got to the GUI, for my table model I created a ColumnMetaData inner class that contains the column name, the accesor Method for the property in the bean and the Class type of the property.
I'm trying to go with simplicity in the GUI because:
The IT director does not anticipate much reuse of the first Java technology system
but I'm not sure if reflection is simple enough.
Did any of you created a class for the hotel rooms, and if you did, how did you managed your JTable? Should I make my table model generic or just stick with the simplicity stuff?.
I actually though about that since I also have a method that constructs the String array but I did not like it because since returns the values with the full length (Hotel Name 64, City 64..), it looks bad on the table and also I wanted to display a checkbox for the smoking column.
But now that I think about it, I can still do/fix those things with your approach and manage to avoid the extra complexity.
Hello, I decided to go with the String array also, how do you keep track of the record number? I added the record number as another string at the end of the String array. Ex: ["Hotel Name", "City", "4", "Y", "$1", "2003/04/04", "0000001", "5"]