Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

jtable using abstracttablemodel  RSS feed

 
mozumder
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi !!
I am in a confusion to save,find and update data from Oracle Databases into Jtable(a component of a Form) using AbstractTableModel & TableCellRenderer.Please help me in a sample code
or by references.
 
Paul Stevens
Ranch Hand
Posts: 2823
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the JavaRanch! Please adjust your display name to meet
the JavaRanch Naming Policy. You can change it here.
Thanks!
and welcome to the JavaRanch!
 
Brian Duff
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
You could build a custom implementation to do this using JDBC and writing a table model from scratch... however, you might want to consider using a component that has already been written to do this kind of thing for you.
In Oracle9i JDeveloper, we have an API known as JClient which provides this kind of functionality: it's a set of model implementations for Swing components (including JTable) which bind the components to information from a database using JDBC.
It might be worth grabbing a copy of JDeveloper (you can download it free from http://otn.oracle.com/software/products/jdev/content.html) and giving JClient a try to see if it fits your needs.
In JDeveloper, the model you're looking for is known as an "Attribute List Control Binding": search for this in the help, or open the help book Developing Java GUI Clients->Creating Data Forms with JClient and Business Components->Working with JClient Models->Setting an Attribute List Control Binding.
(hopefully I'm not advertising too much here... i can provide more details on how to do this kind of thing from scratch too if JClient isn't what you're looking for)
Thanks,
Brian
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!