• Post Reply Bookmark Topic Watch Topic
  • New Topic

Checkbox Verification  RSS feed

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am having difficulty finding the code implemented by java.swing which would check the status of a checkbox (i.e. checked or unchecked)

The program I am writing is supposed to change the text size dependant on the state of the checkbox... here is the code...

if (size._____________()) {
message.setFont(new Font("Serif", Font.PLAIN, 36));
}
else {
message.setFont(new Font("Serif", Font.PLAIN, 12));
}
 
Marshal
Posts: 59166
180
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch.

Have you been through the API and found JCheckBox? Go through it (possibly with ctrl-F for "selected") and look which methods might show whether the box is selected.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!