+ /**
+ * Builds the delete measure popupdialog.
+ * @param pane The container to put the dialog in.
+ */
+ private void makeDeleteMeasureDialog(Container pane) {
+
+ setTitle("Delete Measure");
+ labelA = new JLabel("Delete at:", JLabel.RIGHT);
+ pane.add(labelA);
+ labelB = new JLabel("Measure count:", JLabel.RIGHT);
+ pane.add(labelB);
+ textFieldA = new JTextField();
+ pane.add(textFieldA);
+ textFieldB = new JTextField();
+ pane.add(textFieldB);
+ cancelButton = new JButton("Cancel");
+ pane.add(cancelButton);
+ okButton = new JButton("OK");
+ pane.add(okButton);
+
+ labelA.setBounds(20, 20, 110 ,20);
+ labelB.setBounds(20, 50, 110, 20);
+ textFieldA.setBounds(140 ,20 , 40, 20);
+ textFieldB.setBounds(140,50, 40, 20);
+ cancelButton.setBounds(20 ,95 , 80, 30);
+ okButton.setBounds(120, 95, 60, 30);
+
+ setResizable(false);
+ pack();
+ setSize(210,175);
+ setLocationRelativeTo(Moosique.getGUI());
+ setVisible(true);
+ }
+
+ private void makeTextDialog(Container pane, String filename) {
+ setTitle("User Manual");
+ pane.setLayout(new BoxLayout(pane, BoxLayout.Y_AXIS));
+ File manual = new File(filename);
+ String s;
+ try {
+ BufferedReader br = new BufferedReader(new FileReader(manual));
+ char[] chars = new char[(int)manual.length()];
+ br.read(chars, 0, (int)manual.length());
+ s = new String(chars);
+ } catch (Exception ex) {
+ s = "Manual not found";
+ }
+ pane.add(new JScrollPane(new JTextArea(s, 30, 95)));
+ Action close = new AbstractAction("Close") {
+ public void actionPerformed(ActionEvent ae) {
+ setVisible(false);
+ }};
+ JButton closeButton = new JButton(close);
+ closeButton.setAlignmentX(Component.CENTER_ALIGNMENT);
+ pane.add(closeButton);
+ setResizable(false);
+ pack();
+ setLocationRelativeTo(Moosique.getGUI());
+ setVisible(true);
+ }
+