quindi le prime righe diventano così:

codice:
import java.applet.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.*;

public class Main extends Applet
{
		JFrame frame = new JFrame("Test");
		.....
però non mi va ancora...

per l'immagine sul button ho scritto

ImageIcon cup = new ImageIcon("cup.gif");
JButton button = new JButton(cup);

cup.gif l'ho messa nella cartella del file java... ma anche qui ho fallito miseramente