// This code will go inside the button actionPerformed method // declare display string and initialize to to start a multi-line label String results = ""; // Get one dorm from the selected radiobuttons if (jRadioButton1.isSelected()) { results = results + "Dorm is Day Hall"; } if (jRadioButton2.isSelected()) { results = results + "Dorm is Shaw"; } if (jRadioButton3.isSelected()) { results = results + "Dorm is Lawrinson"; } results = results + "

with features: "; // add all features from the selected checkboxes if (jCheckBox1.isSelected()) { results = results + "

" + jCheckBox1.getText(); } if (jCheckBox2.isSelected()) { results = results + "

" + jCheckBox2.getText(); } if (jCheckBox3.isSelected()) { results = results + "

" + jCheckBox3.getText(); } // Display the result string in a label jLabel3.setText(results);