All pastes #924627 Raw Edit

Untitled

public text v1 · immutable
·published 2008-03-01 15:36 UTC
rendered paste body
import javax.swing.* ;
import java.awt.* ;
import java.awt.event.* ;

class FenBouton extends JFrame implements ActionListener
{
    public FenBouton()
    {
        setVisible(true);
        setTitle("Fenetre à bouton");
        setBounds(100,200,400,500);
        monBouton = new JButton("Ok");
        getContentPane().setLayout(new FlowLayout());
        getContentPane().add(monBouton);
        monBouton.addActionListener(this);        
    }
    
    public void ActionListener()
    {
    }
    
    public void ActionPerformed(ActionEvent ev)
    {
        System.out.println("Pression sur OK !");
    }
    
    private JButton monBouton ;
}

public class Fen
{
    public static void main(String args[])
    {
        FenBouton fen = new FenBouton();
    }
}