Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to uncheck JCheckBox??

 
Kevin Ng
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear all members,
Normally when u want to set the text inside a JTextField u sure will provides the code like nametxt.setText(""); right?
Then how about if i want to set the check box into uncheck situation, i meant clear the check after performed some actions.
And normally if you want to find a record you will write the code as name.getText() right. I'm having a table which has a column name called reminder, once i click on the JCheckBox in my application a word called 'Remind Me!' will store into my reminder column of my table so how am i going to get the data and showing check or uncheck on the JCheckBox when i finding the entire records using my application?
Thank you and i hope not confusing you all.
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24208
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I didn't really understand the part about the table (what is the question exactly?) but to uncheck a JCheckBox, just call setSelected(false) .
 
Kevin Ng
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
About table part....
How can the JCheckBox automatically selected or unselected based on the database. If the column of the databse is selected then the JCheckBox in my application should selected.
Thank you so much!
[ September 18, 2003: Message edited by: Kevin Ng ]
 
VIJAY Yadlapati
Ranch Hand
Posts: 175
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First, get data from the database. Depending on the value of the column in database, check or uncheck the checkbox.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic