

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

package source.Tutorial;
import source.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.JFrame;

public class PopUpForPause extends JFrame
{
	PausePanel pausePanel;
	Container pane = getContentPane();
    
    PopUpForAssist parent;
		
	PopUpForPause(Control control, PopUpForAssist parent)
	{
		super("PAUSE");
		pane.setLayout(new BorderLayout());
        
        this.parent = parent;
		
		setBounds(300,300,200,200);
        //setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		
		setAlwaysOnTop(true);
		pane.setBackground(Color.white);
		//setUndecorated(true);
		
		pausePanel = new PausePanel(control, parent);
		pane.add(pausePanel);
        
		this.addWindowListener(new MyWindowListener());
        
		setVisible(true);
	}
    
    class MyWindowListener extends WindowAdapter {
        public void windowClosing(WindowEvent e)
        {
            parent.popForPause = null;
        }
    }
}
