extends both KeyAdapter and MouseAdapter

Hey all

I’ve followed MrJavaHelps tutorials at youtube, and continued on the little game made.
But, he did the following (kind of):

private class ActionListener extends KeyAdapter{
		public void keyReleased(KeyEvent e){
			spelare.keyReleased(e);
		}
		public void keyPressed(KeyEvent e){
			spelare.keyPressed(e);
		}
	}

Spelare is my player-object, the functions does send the event on to the player to react to them.

So, I wanted to use the MouseAdapter the same way, but it doesn’t work;

private class ActionListener extends KeyAdapter, MouseAdapter{
		public void keyReleased(KeyEvent e){
			spelare.keyReleased(e);
		}
		public void keyPressed(KeyEvent e){
			spelare.keyPressed(e);
		}
		public void mouseClicked(MouseEvent e){
			test = new Point(e.getX(), e.getY());
			spelare.mousePressed(e);
		}
	}

The point is for testing, but, I get an error when trying to do this:

[quote]Syntax error, insert “ClassBody” to complete ClassDeclaration
[/quote]
So, uhm, how to approach this?

Thanks for answers
//M

Nevermind
Solved it

Did a own class for MouseAdapter :

addMouseListener(new AL());
private class AL extends MouseAdapter{
		public void mouseClicked(MouseEvent e){
			test = new Point(e.getX(), e.getY());
			hittade = true;
			spelare.mousePressed(e);
		}
	}