/**  A class which creates a GUI interface for *  the wordMusic class - allowing for easy*  entry of different texts*  @author Andrew Troedson*/  import java.awt.*;import java.awt.event.*;public class wordMusicMaker extends Frame implements ActionListener, WindowListener{TextField fileName;TextArea wordInput;wordMusic musicMaker = new wordMusic();	public void actionPerformed(ActionEvent ae){		if(ae.getActionCommand() == "ActionCompose") {			//musicMaker.setPassage(wordInput.getText());			//musicMaker.setFileName(fileName.getText());			musicMaker.compose(wordInput.getText(), fileName.getText());		}	}		// Deal with the window closebox	public void windowClosing(WindowEvent we) {		System.exit(0);	}	//other WindowListener interface methods	//They do nothing but are required to be present	public void windowActivated(WindowEvent we) {};	public void windowClosed(WindowEvent we) {};	public void windowDeactivated(WindowEvent we) {};	public void windowIconified(WindowEvent we) {};	public void windowDeiconified(WindowEvent we) {};	public void windowOpened(WindowEvent we) {};		public static void main(String args[]){		wordMusicMaker wmm = new wordMusicMaker("Word Music");	}		public wordMusicMaker(String title){		super(title);				//register the closebox event		this.addWindowListener(this);				//assign the frame an icon (only seen in Windows OS)		Image i = Toolkit.getDefaultToolkit().getImage("wmicon.gif");		this.setIconImage(i);		setLayout(new BorderLayout());		Color lightGrey = new Color(240,240,240);		this.setBackground(lightGrey);				Label mainTitle = new Label("WORD MUSIC by Andrew Troedson", 1);		add(mainTitle, "North");		wordInput = new TextArea("Type text here...", 6, 40, 3);		wordInput.setBackground(Color.white);		add(wordInput, "Center");				Panel windowBottom = new Panel();		Label outputFile = new Label("Output File:",1);		fileName = new TextField("wordMusic.mid",16);		Button compose = new Button("Compose");		compose.setBackground(Color.lightGray);		compose.setForeground(Color.darkGray);		compose.addActionListener(this);		compose.setActionCommand("ActionCompose");			windowBottom.add(outputFile);		windowBottom.add(fileName);		windowBottom.add(compose);		add(windowBottom, "South");				Panel eastBorder = new Panel();		add(eastBorder, "East");		Panel westBorder = new Panel();		add(westBorder, "West");				pack();		show();	}}