This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I recently just started the scjd project and I have been working mainly with the client side seeing I have no real programming experience. I have created a main GUI that on startup will display all database records (will not be this way in my final design - did this to get familiar with JTables). After selecting a flight to reserve seating on I have a pop-up window that displays only that database record and has a textfield to take the users requested number of seats. The problem I am having is that the single record has little squares next to the data in some of the fields. What could be causing this? Is this a suitable design for the GUI or could someone recommend something else? I am using a hashtable to store the JTable row numbers associated with database keys and based on Jtable row selection retrieve the associated database record. Is there a better way of doing that? What would performance be like on a large scale using this method? Any help is much appreciated. Dave
When u get the record data from the datafile, just trim the field values of spaces. This should get rid of the squares u get in the GUI. -Arvind
Joined: Jun 12, 2001
Thank you for your reply... I had just returned to post a reply that I had figured it out. While trying to extract the avaiable seating I was getting an runtime exception where I was trying to cast the seating to an int. Did a trim on the string and everything worked fine. Any comments on my gui design still welcomed/appreciated...