class DevicePane extends JPanel {
public DevicePane() {
setLayout(new BorderLayout());
JPanel northpan = new JPanel();
JRadioButton button1 = new JRadioButton("View devices by type");
JRadioButton button2 = new JRadioButton(
"View devices by connection");
ButtonGroup buttons = new ButtonGroup();
buttons.add(button1);
buttons.add(button2);
button1.setSelected(true);
northpan.add(button1);
northpan.add(button2);
JPanel centerpan = new JPanel();
String[] devices = { "Computer", "CD-ROM", "Disk drives",
"Display adapters", "Floppy disk controllers",
"Imaging devices", "Keyboard", "Modem", "Monitors", "Mouse"};
JList deviceList = new JList(devices);
deviceList.setBorder(new TitledBorder("Devices"));
centerpan.add(deviceList);
JPanel southpan = new JPanel();
southpan.add(new JButton("Properties"));
southpan.add(new JButton("Refresh"));
southpan.add(new JButton("Remove"));
southpan.add(new JButton("Print..."));
add(northpan, BorderLayout.NORTH);
add(centerpan, BorderLayout.CENTER);
add(southpan, BorderLayout.SOUTH);
pack();