import java.awt.*;
import java.awt.event.*;
import java.util.EventListener;
import javax.swing.*;
public class ChoicePanel extends JPanel implements ActionListener{
private JButton Client;
private JButton Server;
private JLabel oben;
private ActionListener e;
public ChoicePanel()
{
this.setVisible(true);
this.setFocusable(true);
this.requestFocus();
this.setPreferredSize(new Dimension(500, 350));
this.setLayout(null);
Client= new JButton ("Client");
Client.setBounds(50, 150, 200, 25);
Client.addActionListener(new java.awt.event.ActionListener()
{
public void actionPerformed(ActionEvent e)
{
new Clientmenue();
}
});
Client.setIcon(new ImageIcon("pill.jpg");
Server= new JButton ("Server");
Server.setBounds(250, 150, 200, 25);
Server.addActionListener(new java.awt.event.ActionListener()
{
public void actionPerformed(ActionEvent e)
{
new ServerMenue();
}
});
Server.setIcon(new ImageIcon("pill.jpg");
oben= new JLabel ("Bitte wählen:");
oben.setBounds(210, 75, 200, 25);
this.add(Client);
this.add(Server);
this.add(oben);
}
public interface ActionListener extends EventListener
{
void actionPerformed( ActionEvent c );
}
public void actionPerformed(ActionEvent arg0) {
new Clientmenue();
}
}