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

/**
 * MiniDraw_About
 * <p>
 *   <b>History</b> :
 *   <ul>
 *     <li>Version 0.3 : Add Icon and license GNU GPL
 *     <li>Version 0.2 : Remove photo of authors (sorry flo)</li>
 *     <li>Version 0.1 : Initial version</li>
 *   </ul>
 * </p>
 * @author Pierrick Calvet & Florian Delclaux
 */
public class MiniDraw_About extends JDialog {

/**
 * Build MiniDraw_About's object
 * @param f Reference of parent's frame
 */
  public MiniDraw_About(JFrame f){
    super(f, true);                             /* Parent, modal */
    getContentPane().setLayout(new BorderLayout());
		getContentPane().setBackground(Color.WHITE);

		/* Left */
		JLabel icon = new JLabel(new ImageIcon("Pictures/Icon.jpg"));
		getContentPane().add(icon, "West");
		
		/* Right */
		JTextArea info = new JTextArea("  MiniDraw\n  Version 0.3\n  Author : Pierrick Calvet & Florian Delclaux\n\n  This program is a free software and may be distributed according to the terms of the GNU General Public License.");
    info.setEditable(false);
		info.setColumns(50);
		info.setLineWrap(true);
		info.setWrapStyleWord(true);
		getContentPane().add(info, "Center");

		/* About frame's caracteristics */
    setTitle("About MiniDraw ...");
    setResizable(false);		
    pack();
    setDefaultCloseOperation(HIDE_ON_CLOSE);
    setLocationRelativeTo(f);           /* Place about's frame at center of Conversion's frame */
	}
}
