File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes Display Select Query Result in JTable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Display Select Query Result in JTable" Watch "Display Select Query Result in JTable" New topic
Author

Display Select Query Result in JTable

Sander Silva
Greenhorn

Joined: May 15, 2011
Posts: 28
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
internet detective
Marshal

Joined: May 26, 2003
Posts: 30085
    
149

I'm going to move this to our Swing forum since I think the problem is more on the GUI side.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Rob Camick
Ranch Hand

Joined: Jun 13, 2009
Posts: 2153
    
    7
Look at the "Table From Databse Example" code found in the Table From Database article.
Sander Silva
Greenhorn

Joined: May 15, 2011
Posts: 28
Rob Camick wrote:Look at the "Table From Databse Example" code found in the Table From Database article.


Reply: Thank you!
Sander Silva
Greenhorn

Joined: May 15, 2011
Posts: 28
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
internet detective
Marshal

Joined: May 26, 2003
Posts: 30085
    
149

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

Joined: May 15, 2011
Posts: 28
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Display Select Query Result in JTable
 
Similar Threads
JTable
Image in JTable
JTable
iscelleditable is not working in jtable
Columns on JTable