File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 Java Interview Guide 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

Pasting Data Base results

Luis Canizares

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: 15302

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,
I agree. Here's the link:
subject: Pasting Data Base results
It's not a secret anymore!