Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

1.3.1_09 java version and use of JTable  RSS feed

 
soudamini shirkhedkar
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everybody,
I am trying to use JTable in my GUI for final project.The project also uses JDBC. I am programing in 1.3.1_09 java version.
I want to get the rows that are affected as a result of interaction with the database and I have been trying to implement TableModelListener.
But apparently I cannot do that.
Is the above interface deprecated from this java version?
Whats the problem?
PLease let me know as soon as possible.
Thanks
Soudamini
 
Avi Abrami
Ranch Hand
Posts: 1141
1
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Soudamini,
I may be wrong, but I believe you need to implement the TableModel interface -- and not the TableModelListener interface.
For your information, you can download the chapter on [J]Tables of the book Swing from the following Web page:
http://java.sun.com/developer/Books/swing2/
Also, if you have the entire JDK, it includes example code for exactly your situation -- displaying database data in a "JTable". Look in the "demo\jfc\TableExample" subdirectory of your JDK installation.
Good Luck,
Avi.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!