-
- whichtoedit = new JLabel("Delete track", JLabel.CENTER);
- pane.add(whichtoedit);
- trackList = new JComboBox();
- for (int i = 1; i <= tracks.length; i++) trackList.addItem("Track " + i);
- pane.add(trackList);
- cancelbutton = new JButton("Cancel");
- pane.add(cancelbutton);
- okbutton = new JButton("OK");
- pane.add(okbutton);
-
- whichtoedit.setBounds(50, 10, 100, 20);
- trackList.setBounds(40, 35, 120, 20);
- cancelbutton.setBounds(10, 90, 80, 30);
- okbutton.setBounds(120, 90, 60, 30);
+
+ // Create the contents of the delete dialog and put them in a container.
+ whichToEdit = new JLabel("Delete track", JLabel.CENTER);
+ pane.add(whichToEdit);
+ trackListA = new JComboBox();
+ for (int i = 1; i <= tracks.length; i++) trackListA.addItem("Track " + i);
+ pane.add(trackListA);
+ cancelButton = new JButton("Cancel");
+ pane.add(cancelButton);
+ okButton = new JButton("OK");
+ pane.add(okButton);
+
+ // Set the layout properties of the dialog.
+ whichToEdit.setBounds(50, 10, 100, 20);
+ trackListA.setBounds(40, 35, 120, 20);
+ cancelButton.setBounds(10, 90, 80, 30);
+ okButton.setBounds(120, 90, 60, 30);