package view.panels;

import javax.imageio.ImageIO;
import javax.swing.*;
import java.awt.*;
import java.io.IOException;

/**
 * Implementierung verschiedener Algorithmen zur Berechnung von Ausgleichsgeraden.
 *
 * @Author: Armin Wolf
 * @Email: a_wolf28@uni-muenster.de
 * @Date: 10.09.2017.
 */
public class AboutPanel extends JPanel {

    private JTextArea textArea;
    private JLabel imageContainer;
    private JPanel contentPane;
    private ImageIcon image;

    public AboutPanel(){
        super();
        this.setSize(new Dimension(410,400));
        this.setLayout(new BorderLayout());
        contentPane = new JPanel(new BorderLayout());
        this.textArea = new JTextArea();
        this.textArea.setEditable(false);
        this.textArea.setBackground(new Color(0,0,0,0));
        contentPane.add(this.textArea, BorderLayout.CENTER);
        ClassLoader classLoader = getClass().getClassLoader();
        try {
            image = new ImageIcon(ImageIO.read(classLoader.getResource("wwu.png")).getScaledInstance(300, 87, Image.SCALE_SMOOTH));
        } catch (IOException e) {
            e.printStackTrace();
        }
        this.imageContainer = new JLabel(image);
        contentPane.add(imageContainer, BorderLayout.NORTH);
        this.add(new JPanel(), BorderLayout.NORTH);
        this.add(contentPane, BorderLayout.CENTER);
        this.setVisible(true);
    }


}
