• Post Reply Bookmark Topic Watch Topic
  • New Topic

table rows in JTable  RSS feed

 
karai baskar
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello friends
how can i display resultset in JTable.
can i pass resultset object directly in JTable.is it
possible
pl.help me
baskar
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't use the ResultSet directly but you can write a TableModel class to do the work.
From the Sun site:
For examples of getting data from a database, see the table examples provided as part of the JFC/Swing and Java 2 Standard Edition SDK releases. In JFC/Swing-only releases (for use with JDK 1.1) the table examples are in the examples/Table directory. In J2SE v 1.2, the table examples are in demo/jfc/Table directory. In J2SE v 1.3, the examples move to the demo/jfc/TableExamples directory.
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm moving this to Swing because this is really a Swing question.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!