I have created a form in netbeans with two radio buttons in a button group with a text box. Box 1 = Yes Box 2 = No when form loads no is already selected. I want the text box to be ivisible until user selects yes. but everything I have tried is not working. I put this in the form init part txtMajorAmt.setVisible(false); did not work. But after everything is loaded if I click on yes then no it starts working correct. any help would be appreciated.