Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

tables problem

  Asked By: Madison    Date: Oct 13    Category: Java    Views: 647
  

Anyway.. I have a problem that I can't seem to work out..
What i need to do is form a table for editing by the user.
It would work as so:
The file is loaded first
Then line by line it is read in, the first line would be 'code name' and
then the second line would be the 'translation', third 'code
name', fourth ' translation' etc.
Then the table would print these out in pairs, so the headers would be code
name and translation with each pair of the two outputted, then the
possibilty of saving this again after the table has been changed.

My problem is actually creating the object for loading into the table to show
the two entries/row.

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Tracy Myers     Answered On: Oct 13

Are you using Swing? If you are then the easiest thing to do would be to extend
from the AbstractTableModel and
overload the methods which you need to overload. Take a look at the
AbstractTableModel JavaDoc or go to the Sun
tutorials (specifically, the Swing table  tutorial at
java.sun.com/.../table.html ).

You should try to include more information in your next question (Java version,
OS, UI environment [Swing, web, AWT],
etc). It will help us to be able to respond to your questions. Also, read:
www.tuxedo.org/~esr/faqs/smart-questions.html .

 
Didn't find what you were looking for? Find more on tables problem Or get search suggestion and latest updates.




Tagged: