

//
// Core Program for TETDM 
// PopUpForMission.java Version 1.04
// 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 PopUpForMission extends JFrame
{
	MissionPanel missionPanel;
	Container pane = getContentPane();	
		
	PopUpForMission(int X, int Y, int width, int height, Control control)
	{
		super("Mission");
		pane.setLayout(new BorderLayout());
		
		setBounds(X, Y, width, height);
//		setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
		
		setAlwaysOnTop(true);
		pane.setBackground(Color.white);
//		setUndecorated(true);
		
		missionPanel = new MissionPanel(control, this);
		this.addWindowListener(new MyWindowListener());
		pane.add(missionPanel);		
		setVisible(true);
	}
	
	class MyWindowListener extends WindowAdapter {
		public void windowClosing(WindowEvent e) 
		{
			//System.out.println("windowClosing");
			
			missionPanel.closeWindow();
		}
	}
}
