

//
// Core Program for TETDM 
// PopUpForCharacter2.java Version 1.00
// Copyright(C) 2015-2018 TETDM CORE MEMBER ALL RIGHTS RESERVED.
// This program is provided under the license.
//

package source.GameMode;

import source.*;

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

public class PopUpForCharacter2 extends JFrame
{
	CharacterPanel2 characterPanel2;
	
	Container pane = getContentPane();	
		
	PopUpForCharacter2(int X, int Y, int width, int height, Control control,int cnumber)
	{
		super(CharacterData.charaname[cnumber]);
		pane.setLayout(new BorderLayout());
		
		setBounds(X, Y, width, height);
//		setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
		
		setAlwaysOnTop(true);
		pane.setBackground(Color.white);
//		setUndecorated(true);
		
		characterPanel2 = new CharacterPanel2(control,this,cnumber);
		
		this.addWindowListener(new MyWindowListener());
		pane.add(characterPanel2);
		
		setVisible(true);
	}
	
	class MyWindowListener extends WindowAdapter {
		public void windowClosing(WindowEvent e) 
		{
			//System.out.println("windowClosing");
			characterPanel2.closeWindow();
		}
	}
}
