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

import javax.swing.JButton;
import javax.swing.JFrame;

public class BoutonBonjour extends JFrame implements ActionListener {
	private static final long serialVersionUID = 1L;

	private static final String BONJOUR = "Bonjour !";

	public BoutonBonjour() {
		super(BONJOUR);
		JButton bouton = new JButton(BONJOUR);
		bouton.addActionListener(this);
		getContentPane().add(bouton);
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		pack();
	}

	public void actionPerformed(ActionEvent e) {
		System.out.println(BONJOUR);
	}

	public static void creerIHM() {
		setDefaultLookAndFeelDecorated(true);
		JFrame frame = new HelloSwing();
		frame.setVisible(true);

	}

	public static void main(String[] args) {
		javax.swing.SwingUtilities.invokeLater(new Runnable() {
			public void run() {
				creerIHM();
			}
		});
	}
}
