This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes JTable problem, urgent!! Please help!!!!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JTable problem, urgent!! Please help!!!!!" Watch "JTable problem, urgent!! Please help!!!!!" New topic

JTable problem, urgent!! Please help!!!!!

Tejaswini Shirkhedkar

Joined: Jun 22, 2004
Posts: 17

I want to have a JTable in my GUI that has fixed number ( and names ) of columns but variable number of rows.
The number of rows depend upon the number of records retrieved from the database when the specified query is executed.
Also, I want to display only a fixed number of records at a time, say 30.
Can i have a facility where user can press a NEXT button to see the next bunch of records.
Please help!!!
This is urgent!!!

Steven Bell
Ranch Hand

Joined: Dec 29, 2004
Posts: 1071
You can call the setDataVector method on the DefaultTableModel to change what is in the table.
Matt Fielder
Ranch Hand

Joined: Oct 27, 2004
Posts: 158
Its really not that urgent is it!!!
Ken Blair
Ranch Hand

Joined: Jul 15, 2003
Posts: 1078
What you mentioned is quite simple, do you expect us to write all your code for you? Why don't you explain what part of the implementation is giving you problems and we can go from there. Do you not understand how to add rows? How to set a fixed number of columns? Where's the issue here!
I agree. Here's the link:
subject: JTable problem, urgent!! Please help!!!!!
It's not a secret anymore!