@Action public void showAboutBox() { if (aboutBox == null) { JFrame mainFrame = TicTacToeUIApp.getApplication().getMainFrame(); aboutBox = new TicTacToeUIAboutBox(mainFrame); aboutBox.setLocationRelativeTo(mainFrame); } TicTacToeUIApp.getApplication().show(aboutBox); }
private void settingsBtnMouseReleased( java.awt.event.MouseEvent evt) { // GEN-FIRST:event_settingsBtnMouseReleased // If the user wants to go to the settings, that is handled here IfSettings ifSettings = new IfSettings(); JFrame mainFrame = TicTacToeUIApp.getApplication().getMainFrame(); ifSettings.setLocationRelativeTo(mainFrame); TicTacToeUIApp.getApplication().show(ifSettings); ifSettings.setSize(300, 280); ifSettings.setResizable(false); TicTacToeUIApp.getApplication().getMainFrame().setVisible(false); } // GEN-LAST:event_settingsBtnMouseReleased
private void highScoresBtnMouseReleased( java.awt.event.MouseEvent evt) { // GEN-FIRST:event_highScoresBtnMouseReleased IfHighScores ifHighScores = new IfHighScores(); JFrame mainFrame = TicTacToeUIApp.getApplication().getMainFrame(); ifHighScores.setLocationRelativeTo(mainFrame); ifHighScores.setSize(100, 100); TicTacToeUIApp.getApplication().show(ifHighScores); ifHighScores.setSize(340, 500); ifHighScores.setResizable(false); TicTacToeUIApp.getApplication().getMainFrame().setVisible(false); } // GEN-LAST:event_highScoresBtnMouseReleased
private void playBtnMouseReleased( java.awt.event.MouseEvent evt) { // GEN-FIRST:event_playBtnMouseReleased // Code to handle if the user has selected "Play" ifPlay = new IfPlay(); JFrame mainFrame = TicTacToeUIApp.getApplication().getMainFrame(); ifPlay.setLocationRelativeTo(mainFrame); // TO-DO Figure out how to close this application window without exiting the whole application TicTacToeUIApp.getApplication().show(ifPlay); ifPlay.setSize(300, 280); ifPlay.setResizable(false); TicTacToeUIApp.getApplication().getMainFrame().setVisible(false); } // GEN-LAST:event_playBtnMouseReleased