

import java.awt.*;
import javax.swing.*;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class Window
{
	private JFrame window;
	private JPanel topPanel,
		buttons,
		list;
	private JButton add;

	public Window()
	{
		bListener listener = new bListener();

		window = new JFrame();

		topPanel = new JPanel();
		buttons = new JPanel();
		list = new JPanel();

		add = new JButton("Add");
		add.addActionListener(listener);

		window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

		buttons.add(add);

		topPanel.setLayout(new BorderLayout());
		topPanel.add(list, BorderLayout.WEST); 
		topPanel.add(buttons, BorderLayout.EAST);

		window.add(topPanel);
		window.pack();
		window.setVisible(true);
	}

	private class bListener implements ActionListener
	{
		public void actionPerformed (ActionEvent e)
		{
			if(e.getSource() == add)
				return;
		}
	}
}

@@ -195,17 +195,21 @@
 tton
-s
+Panel
 ,%0A%09%09list
 ;%0A%09p
@@ -204,16 +204,21 @@
 ,%0A%09%09list
+Panel
 ;%0A%09priva
@@ -231,16 +231,53 @@
 tton add
+,%0A    del,%0A%09%09clr;%0A%09private JList list
 ;%0A%0A%09publ
@@ -393,17 +393,21 @@
 %09%09button
-s
+Panel
  = new J
@@ -421,16 +421,21 @@
 ;%0A%09%09list
+Panel
  = new J
@@ -474,19 +474,151 @@
 dd%22);%0A%09%09
-add
+del = new JButton(%22Delete%22);%0A%09%09clr = new JButton(%22Clear%22);%0A%0A%09%09add.addActionListener(listener);%0A%09%09del.addActionListener(listener);%0A%09%09clr
 .addActi
@@ -706,17 +706,21 @@
 %09%09button
-s
+Panel
 .add(add
@@ -721,16 +721,64 @@
 dd(add);
+%0A%09%09buttonPanel.add(del);%0A%09%09buttonPanel.add(clr);
 %0A%0A%09%09topP
@@ -832,16 +832,21 @@
 add(list
+Panel
 , Border
@@ -856,12 +856,13 @@
 out.
-WEST
+SOUTH
 ); %0A
@@ -882,17 +882,21 @@
 d(button
-s
+Panel
 , Border
@@ -906,12 +906,13 @@
 out.
-EAST
+NORTH
 );%0A%0A
@@ -1115,16 +1115,21 @@
 == add)%0A
+%09%09%09%7B%0A
 %09%09%09%09retu
@@ -1132,16 +1132,131 @@
 return;%0A
+%09%09%09%7D%0A%09%09%09else if(e.getSource() == del)%0A%09%09%09%7B%0A%09%09%09%09return;%0A%09%09%09%7D%0A%09%09%09else if(e.getSource() == clr)%0A%09%09%09%7B%0A%09%09%09%09return;%0A%09%09%09%7D%0A
 %09%09%7D%0A%09%7D%0A%7D

add delete & clear buttons, preliminary list stuff