This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Soft Skills and have John Sonmez on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Pasting Data Base results Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Pasting Data Base results " Watch "Pasting Data Base results " New topic
Author

Pasting Data Base results

Luis Canizares
Greenhorn

Joined: Mar 12, 2005
Posts: 12
Does anyone know how to show a complete result grid into any object of Swing or AWt directly like in Visual Basic (I dont like it so much)?
Please let me know your answers

Good luck folks !!
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15300
    
    6

You mean like a JTable? You may also want to look at JDNC which includes data bindings for a JTable to (arguably) make things easier. If you are unfamiliar with JTables I would recommend holding off on JDNC and getting the basics down first though.


GenRocket - Experts at Building Test Data
Ben Wood
Ranch Hand

Joined: Aug 14, 2001
Posts: 342
I use the JTable constructor which accepts two Vectors (one for the rows of data, one for the column names...take a look at the API as suggested above. You can populate these Vectros easily from the ResultSet object of a JDBC query.


SCJP 1.4, www.gsi3d.org.uk
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Pasting Data Base results