• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to add a columns with a button set to a Jtable built with database result set

 
Dips Cruise
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
i have to build a gui to display account numbers and account balances of a particular person, after he logged with the correct user name and password. and when he get the account number and balances in a table, there should be another button to get further details of a account such as transactions, amount of each transaction etc. now i have stucked in the point of adding that button column to the table which is built with database result set. i would thank you if you could help me to implement that part. thank you
 
Maneesh Godbole
Saloon Keeper
Posts: 11073
13
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch.
Here is an example on how to add a button to a table http://www.java2s.com/Code/Java/Swing-Components/ButtonTableExample.htm
 
Dips Cruise
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Maneesh... I tried that too.
But i need to add an additional button column to the table which i build using a record set from database. I built a table with two columns and the number of rows depend on the record set. I can add an additional column name to the column name String type array. but i cannot add buttons to the rowdata Object[] type List . So i'm stuck in adding button column. are there any ideas?
 
Maneesh Godbole
Saloon Keeper
Posts: 11073
13
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dips Cruise wrote:Thank you Maneesh... I tried that too.

Did you also check your private message?
 
wong chang kit
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I'm having this problem too. Anyone knows how to solve it?
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you need to post what your specific problem is,
and the code you've tried.

also would be better in your own thread,
include a link to this thread if you want.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic