File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jtable checkbox

 
jaimin gohel
Greenhorn
Posts: 13
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am having a table which get the data on the page load and has a check box for each row.

i want to perform two things on clicking the check box that is
(1) when any of the check box is clicked all other check box should get disable.

(2) the data of that particular row should get displayed in the text fields below.
 
Jethro Borsje
Ranch Hand
Posts: 100
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Jaimin,


Originally posted by jaimin gohel:
i am having a table which get the data on the page load and has a check box for each row.


I can't seem to find a question in your post, but I'm guessing your want to know how you can achieve both [1] and [2].

i want to perform two things on clicking the check box that is
(1) when any of the check box is clicked all other check box should get disable.

Have you thought about using JRadioButton with a ButtonGroup for this approach. Radio buttons are more commonly used when you want to achieve this kind of behaviour.

(2) the data of that particular row should get displayed in the text fields below.

You can add a action listener to the radio button which is called when you select the radio button of a specific row. Using this listener you can fetch the record number associated with it's row.

Best regards,
Jethro
[ July 30, 2008: Message edited by: Jethro Borsje ]
 
jaimin gohel
Greenhorn
Posts: 13
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you

for your suggestion ..........
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic