Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Swing / AWT / SWT
Search Coderanch
Advance search
Google search
Register / Login
Win a copy of
Helidon Revealed: A Practical Guide to Oracle’s Microservices Framework
this week in the
Java in General
forum!
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Tim Cooke
paul wheaton
Liutauras Vilda
Ron McLeod
Sheriffs:
Jeanne Boyarsky
Devaka Cooray
Paul Clapham
Saloon Keepers:
Scott Selikoff
Tim Holloway
Piet Souris
Mikalai Zaikin
Frits Walraven
Bartenders:
Stephan van Hulst
Carey Brown
Forum:
Swing / AWT / SWT
Problems with JTable
kavita dodamani
Greenhorn
Posts: 1
posted 20 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I prepared a JTable. I want to extract the values from the database & put them into the JTable.So,Please give me the tips.
Thanku
Vijay
Greenhorn
Posts: 5
posted 20 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
use TableModel. A table gets its data from an object that implements the TableModel interface.
Jason Steele
Ranch Hand
Posts: 100
posted 20 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Just iterate through the ResultSet and add them to your TableModel.
while(rs.next()) { tableModel.addRow(new Object[] { field1, field2, etc. }); }
real generic...and REAL basic...but when you get the hang of this, then move on to bigger and better things.
Good Luck!
An egg is a chicken's house!
There are no more "hours", it's centi-days. They say it's better, but this tiny ad says it's stupid:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
JTable
JTable
jtable
jtable
JTable
More...