X-Git-Url: https://ruin.nu/git/?p=moosique.git;a=blobdiff_plain;f=MooDialog.java;h=7038c908c85d6235caae5ec861f47fc9ddc8ba60;hp=e4f3b0fdb0a6790c7e4556a9433acf37fe61579f;hb=17d535e703a8ba178ad816d0a0cf4fa1ac787e5b;hpb=d2e307b3375152f1b47c59bc05210c96dc99f679 diff --git a/MooDialog.java b/MooDialog.java index e4f3b0f..7038c90 100644 --- a/MooDialog.java +++ b/MooDialog.java @@ -470,26 +470,23 @@ public class MooDialog extends JDialog { */ public MooDialog(MooNote mn) { super(Moosique.getGUI(), "Note properties", false); + JPanel panel = new JPanel(); + panel.setLayout(new GridLayout(3,2)); note = mn; pitch = new JTextField(new Integer(note.getPitch()).toString(),3); - JPanel pitchpanel = new JPanel(); - pitchpanel.add(new Label("Pitch: ")); - pitchpanel.add(pitch); + panel.add(new Label("Pitch: ")); + panel.add(pitch); velocity = new JTextField(new Integer(note.getVelocity()).toString(),3); - JPanel velocitypanel = new JPanel(); - velocitypanel.add(new Label("Velocity: ")); - velocitypanel.add(velocity); + panel.add(new Label("Velocity: ")); + panel.add(velocity); length = new JTextField(new Integer(note.getDuration()).toString(),5); - JPanel lengthpanel = new JPanel(); - lengthpanel.add(new Label("Length: ")); - lengthpanel.add(length); + panel.add(new Label("Length: ")); + panel.add(length); Object[] array = {"Set the note properties", - pitchpanel, - velocitypanel, - lengthpanel}; + panel}; final String btnString1 = "Apply changes"; final String btnString2 = "Cancel";