FANDOM


import java.applet.Applet;
import java.awt.event.MouseEvent;
import java.awt.event.MouseAdapter;
import java.awt.Button;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class GruppeB3a extends Applet implements ActionListener
{
	Button button = new Button("button");
	 
	public void init()
	{
			
	}
	
	public void start()
	{
		this.addMouseListener(new MyMouseListener());
		button.addActionListener(this);
		this.add(button);
	}
	
	public void stop()
	{
		
	}
	
	public void destroy()
	{
		
	}
	//	Lokale Klasse
	class MyMouseListener extends MouseAdapter
	{
		public void mousePressed(MouseEvent e)
		{
			showStatus("X: "+ e.getX() +"  Y: "+ e.getY());
		}
	}

	public void actionPerformed(ActionEvent e)
	{
		System.out.println("eine Meldung");
	}
}