import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

/** Classe définissant la fenêtre Apropos*/
public class APropos extends JDialog implements ActionListener {

    JButton b_ok = null;	
    AproposDessin dessin = null;
    JFramePrincipale fenetre = null;
    
    int largeur, hauteur;

/** Constructeur*/
    APropos(JFramePrincipale frame) {
	
	super(frame, "A Propos ...", true);

	fenetre = frame;

	setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
	int x = fenetre.getSize().width/2;
	int y = fenetre.getSize().height/2;
	setBounds(x-300, y-200, 600, 400);

	dessin = new AproposDessin(this, 570, 320);

	b_ok = new JButton("Retour");
	b_ok.setFont(new Font("Dialog", Font.BOLD, 12));
	b_ok.setBounds(250, 340, 100, 30);
	b_ok.addActionListener(this);

	getContentPane().setLayout(null);
	getContentPane().add(dessin);
	getContentPane().add(b_ok);
	
	setVisible(true);
	dessin.action();
	
    }
	/** Gestion des évènements*/
    public void actionPerformed (ActionEvent e) {
	
	Object source = e.getSource();
	if (source == b_ok) {
	    dispose();
	}
	
    }
}
