Java Reference
In-Depth Information
L ISTING 7.1 Continued
quitInstallation();
}
});
// radio buttons setting
jRadioMinimal.setText(“minimal”);
jRadioCustom.setText(“custom”);
jRadioTypical.setText(“typical”);
jRadioTypical.setSelected(true);//the default one
ButtonGroup group = new ButtonGroup();
installButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(ActionEvent e) {
install();
7
}
});
group.add(jRadioMinimal);
group.add(jRadioTypical);
group.add(jRadioCustom);
installButton.setText(“Install”);
installButton.setIcon(installIcon);
jPanel2.setBorder(titledBorder1);
jPanel2.setLayout(new BorderLayout());
imageLabel.setIcon(new ImageIcon(appLargeIconName));
jPanel1.setLayout(new BorderLayout());
msgTextArea.setPreferredSize(new Dimension(180,80));
msgTextArea.setBorder(BorderFactory.createEmptyBorder(4,6,4,6));
msgTextArea.setText(applDesc);
msgTextArea.setLineWrap(true);
msgTextArea.setEditable(false);
msgTextArea.setWrapStyleWord(true);
getContentPane().add(jPanel1, BorderLayout.CENTER);
jPanel1.add(imageLabel, BorderLayout.CENTER);
jPanel1.add(msgTextArea, BorderLayout.EAST);
jPanel1.setBackground(Color.white);
getContentPane().add(jPanel2, BorderLayout.SOUTH);
jPanel2.add(box1, BorderLayout.CENTER);
box1.add(jRadioMinimal, null);
box1.add(jRadioTypical, null);
box1.add(jRadioCustom, null);
jPanel2.add(installButton, BorderLayout.EAST);
//shows up
pack();
Search WWH ::




Custom Search