From 964980cf244e780600db6d5e05d036edbb3a15da Mon Sep 17 00:00:00 2001 From: Einar Pehrson Date: Mon, 28 Apr 2003 01:40:39 +0000 Subject: [PATCH] Fixed MooGUI's windowlistener and changed the font of MooInstrumentList --- MooGUI.java | 7 ++++--- MooInstrumentList.java | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/MooGUI.java b/MooGUI.java index 0c17202..60bb7ac 100644 --- a/MooGUI.java +++ b/MooGUI.java @@ -18,6 +18,7 @@ public class MooGUI extends JFrame implements WindowListener { */ public MooGUI(Sequence seq) { super("Moosique"); + addWindowListener(this); MooInstrumentList m = new MooInstrumentList(); getContentPane().add(m); m.addKeyListener(new MooKeyboard()); @@ -38,9 +39,9 @@ public class MooGUI extends JFrame implements WindowListener { seq = sequence; } - public void windowOpened(WindowEvent e) {} - public void windowClosing(WindowEvent e) {} - public void windowClosed(WindowEvent e) {Moosique.quit();} + public void windowOpened(WindowEvent e) {} + public void windowClosing(WindowEvent e) {Moosique.quit();} + public void windowClosed(WindowEvent e) {} public void windowIconified(WindowEvent e) {} public void windowDeiconified(WindowEvent e) {} public void windowActivated(WindowEvent e) {} diff --git a/MooInstrumentList.java b/MooInstrumentList.java index 3e538d4..1864b69 100644 --- a/MooInstrumentList.java +++ b/MooInstrumentList.java @@ -1,5 +1,6 @@ import javax.sound.midi.*; import javax.swing.*; +import java.awt.*; import java.awt.event.*; /* @@ -12,6 +13,7 @@ public class MooInstrumentList extends JComboBox implements ActionListener { public MooInstrumentList() { super(instruments); + setFont(new Font("Times New Roman", Font.PLAIN, 10)); addActionListener(this); } -- 2.39.2