+ /**
+ * Builds the set tempo dialog.
+ * @param pane The container to put the dialog in.
+ * @param tracks A array containing miditracks.
+ */
+ private void makeSetTempoDialog(Container pane) {
+
+ setTitle("Set tempo");
+ // creating labels and adding them to a container
+ labelA = new JLabel("Measure", JLabel.CENTER);
+ pane.add(labelA);
+ labelB = new JLabel("Beat", JLabel.CENTER);
+ pane.add(labelB);
+ labelC = new JLabel("Tick", JLabel.CENTER);
+ pane.add(labelC);
+ labelD = new JLabel("Start at:", JLabel.RIGHT);
+ pane.add(labelD);
+ labelE = new JLabel("End at:", JLabel.RIGHT);
+ pane.add(labelE);
+ labelF = new JLabel("to", JLabel.CENTER);
+ pane.add(labelF);
+
+ // the starting textfields and adding them to the container
+ textFieldA = new JTextField();
+ pane.add(textFieldA);
+ textFieldB = new JTextField();
+ pane.add(textFieldB);
+ textFieldC = new JTextField();
+ pane.add(textFieldC);
+ // ending textfields and adding them to the container
+ textFieldD = new JTextField();
+ pane.add(textFieldD);
+ textFieldE = new JTextField();
+ pane.add(textFieldE);
+ textFieldF = new JTextField();
+ pane.add(textFieldF);
+ // the amount to edit textfields and adding them to a container
+ textFieldG = new JTextField();
+ pane.add(textFieldG);
+ textFieldH = new JTextField();
+ pane.add(textFieldH);
+ textFieldI = new JTextField();
+ pane.add(textFieldI);
+ textFieldJ = new JTextField();
+ pane.add(textFieldJ);
+ textFieldK = new JTextField();
+ pane.add(textFieldK);
+
+ // creating the buttons and adding them to the container
+ JRadioButton constant = new JRadioButton("Set constant tempo of:");
+ constant.setSelected(true);
+ pane.add(constant);
+ JRadioButton change = new JRadioButton("Gradually change tempo:");
+ pane.add(change);
+ JRadioButton scale = new JRadioButton("Scale tempo in %:");
+ pane.add(scale);
+ JRadioButton add = new JRadioButton("Add to current tempo:");
+ pane.add(add);
+
+ // creating a buttongroup and adding the buttons above
+ ButtonGroup group = new ButtonGroup();
+ group.add(constant);
+ group.add(change);
+ group.add(scale);
+ group.add(add);
+
+ // creating the cancel and ok button
+ cancelButton = new JButton("Cancel");
+ pane.add(cancelButton);
+ okButton = new JButton("OK");
+ pane.add(okButton);
+
+
+ labelA.setBounds(80, 25, 50, 20);
+ labelB.setBounds(145, 25, 50, 20);
+ labelC.setBounds(210, 25, 50, 20);
+ labelD.setBounds(20, 45, 60, 20);
+ labelE.setBounds(20, 65, 60, 20);
+ labelF.setBounds(255, 125, 20 ,20);
+
+ textFieldA.setBounds(80, 45, 50, 20);
+ textFieldB.setBounds(145, 45, 50, 20);
+ textFieldC.setBounds(210, 45, 50, 20);
+ textFieldD.setBounds(80, 65, 50, 20);
+ textFieldE.setBounds(145, 65, 50, 20);
+ textFieldF.setBounds(210, 65, 50, 20);
+
+ textFieldG.setBounds(205, 100, 35, 20);
+ textFieldH.setBounds(220, 125, 35, 20);
+ textFieldI.setBounds(280, 125, 35, 20);
+ textFieldJ.setBounds(170, 150, 35, 20);
+ textFieldK.setBounds(200, 175, 35, 20);
+
+ constant.setBounds(20, 100, 180, 20);
+ change.setBounds(20, 125, 200, 20);
+ scale.setBounds(20, 150, 150, 20);
+ add.setBounds(20, 175, 175, 20);
+
+ cancelButton.setBounds(75, 215, 80, 30);
+ okButton.setBounds(195, 215, 60, 30);
+
+ setResizable(false);
+ pack();
+ setSize(340,300);
+ setLocationRelativeTo(Moosique.getGUI());
+ setVisible(true);
+ }
+
+