JTable


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: JTable

  1. #1
    Join Date
    Sep 2002
    Posts
    9

    JTable

    Hi to all,

    I need a little help in menaging a JTable.

    I have created a Class called TeamsTable which creates a new object JTable and sets the model for a table.
    Anoter class create an object TeamTable.
    By clicking on a button called "Bologna" the event menages the reading of some datas from file and then would add rows to the model. Finally it sets the table again with the new model (with the added rows).
    The problems I have are:

    1) when I close the table and click again on the same button "Bologna" it loads the datas into the model by adding new rows to the previous one so datas appear 2 times (or 3... it depends on how many time you close the table and click again on the button);
    I tried to empty the mdoel but it doesn't work, I don't know why

    2) I tried to add a column to my table using a Vector of JCheckBox objects. It is usefull to me to allow the user to select the entries he wants to have.
    And another time it doesn't work!


    3) after I have solved the 2 previous probelms I have to catch the checked rows (that an user has chosen) and put them in to an array. I have no idea how I can realize this thing! Can someone suggest me the code?

    I know it is a little bit complicated to explain, and for this reason I will attach the 2 files *java with the relative code...
    Please help me!

    Thanks in advanced!
    Bye Bye
    Attached Files Attached Files

  2. #2
    Join Date
    Sep 2002
    Posts
    9
    sorry I have forgotten to attach the file from which are extracted datas...
    I attach it here, and of course the path in my code must be changed!
    thanks again!
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center