Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dynamic JTable

 
deepal_mehta
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Friends
I want to dynamically generate Jtable so that I will be able to display the data as per the resultset rows i.e I can have the same number of rows within the JTable as much records I have received from the resultset.
Please provide me the solution as early as possible.
If possible please provide me with the code.
Waiting for reply.
Deepal
 
SAFROLE YUTANI
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a very easy problem. Use JTable in conjunction with DefaultTableModel, or create your own model by sub-classing DefaultTableModel. Update your table through the model. I wont give you the full solution because you'll learn much more if you go into the docs and figure it out yourself.
Dont ask people to solve problems for you. It's obvious that you have'nt even bothered to look at the documentation, otherwise you would have a idea of what you have to do.

SAF
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic