Problemas com o ActionListener

Olá. Estou com um problema no ActionListener, no qual ele dá o erro “ActionListener cannot be resolved to a type”.

O código-fonte é esse:

import javax.swing.*;
import java.awt.*;
import java.awt.Event.*;
public class ExemploBotaoSair extends JFrame{

	JButton botaosair;
	
	public ExemploBotaoSair(){
		
		super("Exemplo com botao sair");
		Container tela = getContentPane();
		setLayout(null);
		botaosair = new JButton("Sair");
		botaosair.setBounds(100,50,100,20);
		botaosair.addActionListener(
				new ActionListener(){		
			public void actionPerformed(ActionEvent e){
				System.exit(o);
			}	
		}
	);
		tela.add(botaosair);
		setSize(300, 150);
		setVisible(true);
		}
	public static void main(String[] args) {

		ExemploBotaoSair app = new ExemploBotaoSair();
		app.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

	}

}

Se puderem me ajudar agradeço!!

Muito obrigado!

Oi,

faltou apenas adicionar os imports corretamente.

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

E outra… dentro do system.exit(0) é colocado um int e não um char. Você colocou a letra ‘o’

Tchauzin!

[quote=marcus.rodrigues]
import javax.swing.;
import java.awt.
;
import java.awt.Event.*;[/quote]

Esse Event não deveria ser event?

[]'s
JL

uhahuauha…os 2 estavam certos!! Coloquei a letra “o” em vez do “0” no System.exit() e também a classe java.awt.event.*; realmente é com letra minúscula!!

Brigadão pela ajuda!!^^