package lab10;

import java.awt.GridLayout;
import java.awt.event.ActionEvent;

import javax.swing.AbstractAction;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;

public class TicTacToeQuit extends JPanel{
	public TicTacToeQuit(final TicTacToeNav nav){
		super(new GridLayout(3,1));
		setFocusable(true);

		add(new JLabel("Quit ?"));
		add(new JButton(new AbstractAction("no no i just missclicked !!"){
			public void actionPerformed(ActionEvent e) {
				nav.title();
			}
		}));
		add(new JButton(new AbstractAction("YES !!! WHY SHOULD I CONFIRM!!!!"){
			public void actionPerformed(ActionEvent e) {
				nav.exit();
			}
		}));
	}
}
