• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

jtable checkbox

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thank you

for your suggestion ..........
 
reply
    Bookmark Topic Watch Topic
  • New Topic