/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package gamegraphics;

import java.awt.Color;
import javax.swing.JPanel;
import javax.swing.JTextPane;
import javax.swing.text.html.HTMLEditorKit;

/**
 *
 * @author Ani
 */
public class SomethingFailedPanel extends JPanel{
    private JTextPane textPane;
    private String text;


    public SomethingFailedPanel(String text) {
        this.text = text;
        init();
    }

    private void init() {
        initSettings();
        initTextPane();
    }

    private void initSettings(){
        setSize(800, 500);
        setLayout(null);
        setBackground(new Color(30, 180, 30));
    }

    private void initTextPane(){
        textPane = new JTextPane();
        textPane.setEditorKit(new HTMLEditorKit());
        textPane.setEditable(false);
        textPane.setBounds(200, 200, 400, 200);
        textPane.setBackground(getBackground());
        //textPane.setText("<p align=\"center\" style=\"font-size: 30px\">"+text+"</p>");
        textPane.setText("<p align=\"center\">"+text+"</p>");
        add(textPane);
    }



}
