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 SQL query data -> JTable within JFrame Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "SQL query data -> JTable within JFrame" Watch "SQL query data -> JTable within JFrame" New topic
Author

SQL query data -> JTable within JFrame

Jason Lichti
Greenhorn

Joined: Sep 30, 2012
Posts: 3
I'm very new to Java. Actually I just started 3 days ago. My only other programming experience is with excel vba. I'm trying to write a small program but don't know where to start. I want to run an sql query, create a JTable (within a large JFrame) that's sized correctly to represent the data found, and then put the results into that table. Would it be best to import the SQL query data into an array and then into the table?? What I have achieved so far is a small gui which has a few buttons that run queries and post the data into a textarea, but not a table. Is there any good documentation for working with JTables? What would you guys recommend I read? I know some of this is vague, so sorry about that. I can go more into detail if necessary!!
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
> Is there any good documentation for working with JTables?

bookmark this page

http://docs.oracle.com/javase/tutorial/uiswing/TOC.html

scroll down the page a bit to "how to use tables'
Jason Lichti
Greenhorn

Joined: Sep 30, 2012
Posts: 3
I searched for something like that. Thank you for the link sir! I'll see what I can do with it!
Ranganathan Kaliyur Mannar
Bartender

Joined: Oct 16, 2003
Posts: 1077
    
  10

and Welcome to the Ranch!


Ranga.
SCJP 1.4, OCMJEA/SCEA 5.0.
Jason Lichti
Greenhorn

Joined: Sep 30, 2012
Posts: 3
Thank you Ranganathan.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: SQL query data -> JTable within JFrame