You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public class TopPanel extends JPanel implements ChangeListener
{
private JTextField statusText;
private JButton resetButton;
private MancalaModel model;
private MancalaGame game;
public TopPanel(MancalaGame g, MancalaModel m)
{
model = m;
game = g;
statusText = new JTextField(55);
statusText.setEditable(false);
resetButton = new JButton("Reset");
this.setLayout(new FlowLayout());
resetButton.addMouseListener(new MouseAdapter()
{
public void mousePressed(MouseEvent e)
{
int option = JOptionPane.showConfirmDialog(null, "Are you sure you want to reset the game?", "Reset", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);