}
/**
- * creates a JFrame popupmenu, containing diffrent choices
- * @param title the title of the JFrame
- * @param labelone the first label of two
- * @param labeltwo the second label of two
- * @return trackframe the JFrame to popup....ffaaaaaaaaaaaaaaaan!
+ * creates a JDialog popupmenu, containing diffrent choices
+ * @param title the title of the dialog
+ * @return trackframe the JDialog....ffaaaaaaaaaaaaaaaan!
*/
-
-
-
+ //private JDialog makeDialog(String title){
+ //
+ //}
/**
* checks if the fileformat is compatible with our program
* @param f the file to check
} else if (command == "Add track...") {
- JFrame frame = new JFrame("Add track");
- JPanel panel = new JPanel();
- //panel.setPreferredSize(new Dimension(250,400));
- panel.setLayout(new GridLayout(2,2));
- frame.setContentPane(panel);
-
- JLabel top = new JLabel("Name of track", JLabel.CENTER);
- top.setFont(new Font("Times new Roman", Font.BOLD, 10));
- panel.add(top);
-
- JTextField field = new JTextField(5);
- panel.add(field);
-
- JLabel bottom = new JLabel("Add it after",JLabel.CENTER);
- bottom.setFont(new Font("Times new Roman", Font.BOLD, 10));
- panel.add(bottom);
-
- JComboBox tracklist = new JComboBox();
- panel.add(tracklist);
-
-
- frame.pack();
- frame.show();
+ MooDialog what = new MooDialog(MooDialog.ADD_TRACK);
Moosique.getSequence().createTrack();
} else if (command == "Delete track...") {
-
- JFrame frame = new JFrame("Delete track");
- JPanel panel = new JPanel();
- panel.setPreferredSize(new Dimension(250,400));
- frame.setContentPane(panel);
-
- frame.pack();
- frame.show();
+
+ MooDialog what = new MooDialog(MooDialog.DELETE_TRACK);
/* Let the user select a track from a list.
seq = Moosique.getSequence();
*/
} else if (command == "Copy track...") {
- JFrame frame = new JFrame("Copy track");
- JPanel panel = new JPanel();
- panel.setPreferredSize(new Dimension(250,400));
- frame.setContentPane(panel);
+ MooDialog what = new MooDialog(MooDialog.COPY_TRACK);
- frame.pack();
- frame.show();
-
} else if (command == "Move track...") {
- JFrame frame = new JFrame("Move track");
- JPanel panel = new JPanel();
- panel.setPreferredSize(new Dimension(250,400));
- panel.setLayout(new GridLayout(2,2));
- frame.setContentPane(panel);
-
- frame.pack();
- frame.show();
-
+ MooDialog what = new MooDialog(MooDialog.MOVE_TRACK);
} else if (command == "Insert measure...") {