• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Display Select Query Result in JTable

 
Sander Silva
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

I'm New to Java please help to solve this problem.
I need to fill JTable with a Select Query results.


I can get coded data into a JTable like this from an Array.


Also I can Print the Select Query result (But not in a Jtable) like this



But I need to get the Query results to appear in the JTable instead of
Coded array.

Currently I have both parts in together.
No errors, Please help me to Display this Select Query ("SELECT VID,Name From Main")
in JTable. Whole code looks like this. I know this is simple, But I'm new to Java.




I know this is crazy , But I'm struggling to do this
please help. Thank you very much for reading!

 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34218
341
Eclipse IDE Java VI Editor
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm going to move this to our Swing forum since I think the problem is more on the GUI side.
 
Rob Camick
Ranch Hand
Posts: 2565
9
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look at the "Table From Databse Example" code found in the Table From Database article.
 
Sander Silva
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rob Camick wrote:Look at the "Table From Databse Example" code found in the Table From Database article.


Reply: Thank you!
 
Sander Silva
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeanne Boyarsky wrote:I'm going to move this to our Swing forum since I think the problem is more on the GUI side.


ok, That's better. Thank you for putting it in a relevent place.
Do I have to do anythink to put this on Swing forums? or
post it again in swing forum?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34218
341
Eclipse IDE Java VI Editor
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sander Silva wrote:
Jeanne Boyarsky wrote:
Do I have to do anythink to put this on Swing forums? or
post it again in swing forum?

Nope. It's in the Swing forum now. There's a link from the JDBC forum so people can see it in both places for a little while.
 
Sander Silva
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeanne Boyarsky wrote:
Sander Silva wrote:
Jeanne Boyarsky wrote:
Do I have to do anythink to put this on Swing forums? or
post it again in swing forum?

Nope. It's in the Swing forum now. There's a link from the JDBC forum so people can see it in both places for a little while.


Ok, Thank you very much
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic