ESEMPIO 2
public class Applet2 extends JApplet {
JButton redButton, blueButton, greenButton;
Container c = getContentPane();
c.setBackground(SystemColor.window);
c.setLayout(new FlowLayout());
redButton = new JButton("Rosso");
blueButton = new JButton("Azzurro");
greenButton = new JButton("Verde");
messaggio = new JTextField(26);
messaggio.setText("Premere un pulsante");
messaggio.setEditable(false);