Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Record Reading Problem

 
Dave McCarthy
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Arvind Popli
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Dave McCarthy
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...

Thanks again...
Dave
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic