good point and what you mentioned looks good, BUT if i set the initial state of the jtextfield to NOT be visible it is never displayed. if i set it be VISIBLE after two mouse clicks of the check box it works just fine... here is the code.
//MinimumRowsToShowTextFie
void TableDetailsCheckBox_itemS
if( TableDetailsCheckBox.isSel
MinimumRowsToShowTextField
MinimumRowsToShowTextField
System.out.println("hi hi");
}
else{
MinimumRowsToShowTextField
MinimumRowsToShowTextField
System.out.println("bye bye");
}
}
Is there a reason the jtextfield can not be made visible if it is run as jcheckbox.setVisible(false
Main Topics
Browse All Topics





by: conickPosted on 2003-01-17 at 12:15:56ID: 7749619
You want the textfield to appear if the checkbox is checked, right? If so, why not use that in your code instead of checking the visibility of the textfield?
e) { e); se);
For instance:
public void itemStateChanged(ItemEvent
if (e.getStateChange() == ItemEvent.SELECTED) {
//textfield.setVisible(tru
} else {
//textfield.setVisible(fal
}
I hate generated code with a passion, it makes the simplest code is difficult to read.