File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes jtable checkbox Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "jtable checkbox" Watch "jtable checkbox" New topic
Author

jtable checkbox

jaimin gohel
Greenhorn

Joined: Jul 30, 2008
Posts: 13
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

Joined: Jul 22, 2008
Posts: 100
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 ]

SCJP, SCJD
jaimin gohel
Greenhorn

Joined: Jul 30, 2008
Posts: 13
thank you

for your suggestion ..........
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jtable checkbox
 
Similar Threads
print option in java
disabling and enabling text boxes
JSP+Javascript doubt
Datatable with only one select all checkbox in the first row
how to select a row datatable