This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Record Reading Problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Record Reading Problem" Watch "Record Reading Problem" New topic
Author

Record Reading Problem

Dave McCarthy
Greenhorn

Joined: Jun 12, 2001
Posts: 23
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

Joined: Jul 30, 2001
Posts: 7
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

Joined: Jun 12, 2001
Posts: 23
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Record Reading Problem
 
Similar Threads
JTable Freezes...Help!
JTable
Getting Last Record in Jtable
Any way to prevent hardcoding the JTable column index?
JTable