r/javahelp • • Jun 10 '21

Codeless Best game development frameworks

16 Upvotes

Hello,

I am trying to choose a Java framework for creating 2D and 3D games. I'm not new to Java; already know how to create desktop apps with JavaFX.

So far I know that LWJGL is fast, but pretty hard to learn.

LibGDX is the most popular, I believe, but I don't know if it's easier to learn than LWJGL?

JMonkeyEngine, according to the internet, is an overkill for 2D games, so maybe another choice would be better? Or not?

Maybe another framework is better than those, why?

So which has the best performance; which is easier to learn than some other framework; which are cross-platform; and which do you prefer yourself [not only from the frameworks I listed above]?


r/javahelp • • May 20 '21

Which udemy course for Microservices?

16 Upvotes

I want to learn about microservices but I can't decide between these two courses. Does anybody have experience with either of them? One is from in28minutes the other is from John Thompson (Spring guru)

  1. https://www.udemy.com/course/microservices-with-spring-boot-and-spring-cloud/

  2. https://www.udemy.com/course/spring-boot-microservices-with-spring-cloud-beginner-to-guru/


r/javahelp • • Mar 16 '21

I wrote a simple card deck with a shuffle capability, can anyone review it? I’m newer to java and don’t want to build bad habits.

16 Upvotes

Github link in comments


r/javahelp • • Feb 01 '21

I think my teacher is wrong about checked and unchecked exceptions?

16 Upvotes

I’m not sure this is the right place to post this, but I feel like I’m going crazy so I’d appreciate any input you can give me. And just to qualify at the start here— I’m planning on just letting this one go. I can do it the way they want it for the course of the class. I don’t think I have anything to gain from making a big deal out of it.

Anyway, my understanding of checked exceptions is that they are the exceptions of the Exception superclass which are not subclasses of RuntimeException. They have the catch or specify requirement. As such, they are the exceptions we use try-catch blocks of code for. If I’m already wrong feel free to skip the rest and shame me in the comments.

That said, my teacher has been very firm that unchecked exceptions are the ones we use try-catch blocks for. I sent them an email with a link to the oracle Java tutorials that’d seemed to back up my understanding of things. At the very least, I was hoping for some guidance on why I might have misunderstood the page I linked or if there was a better place to get my supplemental information. The reply email I got just restated what I shared with you above.

Am I crazy??? I just need a little validation here. I am a novice so I’m not assuming I am more knowledgeable. However, I seem to have two conflicting sources here (the teacher and the internet) and it’s giving me a bit of anxiety. Any help you can give me would be appreciated.


r/javahelp • • Aug 21 '20

Skipping javac

16 Upvotes

I haven't really used the command line java and javac in a while since I use Ant or some other build tool. When did they make it so you could run the following:

java MyApp.java 

Instead of having to do

javac MyApp.java java MyApp 

I just updated from JDK11 to 14, but I guess this also worked in JDK11, just never tried it I guess.


r/javahelp • • May 18 '20

What files should be ignored with a Java Spring webservice (aka, what files should be added to .gitignore typically)?

16 Upvotes

So, I am more familiar with Angular than Java and currently learning Java Spring. I understand with JavaScript Angular, typically .gitignore is set to simply ignore the node_modules folder, as it is large and you don't need it thanks to the package.json file.

However, I am not clear if I need to do something similar for a Java Spring webservice project? I made one via start(dot)spring(dot)io website. Then build stuff up around it. I understand that JARS are installed or imported (again, new to JAVA, so don't know the correct term). I'm guessing those are similar to the node_module files with Javascript?

Either way, is there anything that should be added to a .gitignore file when sending it to github typically? What files or folders are typically ignored in a standard type of Java Spring webservice?


r/javahelp • • Feb 13 '20

What the freak are buffered readers?

16 Upvotes

Can someone help me and tell me what exactly it does? Thanks


r/javahelp • • Dec 26 '19

Would it be possible to write a java program that can clone all mouse and keyboard inputs on one window to another background window?

16 Upvotes

Let's just say I'm on one window doing stuff with my keyboard and mouse, I want the program to basically clone everything I've done and send these simulated events to a background window.


r/javahelp • • Nov 28 '19

Math.Random keeps generating the same Value

16 Upvotes

I'm generating a 12 digit number for a Credit card. it must be 12 digits but random. have this line for code here :

debitCardNumber = (int) (Math.random() * Math.pow(10,12));
But, it keeps generating this value over and over: 2147483647.

In addition its 10 digits and not 12!


r/javahelp • • Nov 06 '19

Going crazy, need help with a program

16 Upvotes

Hi guys, I'm an ansipring java developer. My developer friend gave me an exercise and I can't for the life of me figure out how to do it. If you guys could help I would be so grateful.

This is the exercise:

Given a weather.dat file, write a program that given the file in input returns the day with the biggest and lowest temperature range. In this file there are 30 days and there's a lot of data for these days, but the temperature columns are the second and third one. So it's like : Day | Max Temp | Lowest Temp| ecc | ecc | ...

I understood I have to use Java Arrays and I managed to have the program read all the file but I don't know how to proceed. Help, thanks lol


r/javahelp • • Oct 13 '19

Homework How to format a String into rows and columns using a single JOptionPane.showMessageDialog window?

16 Upvotes

Hello! I am learning Java at university and am having trouble with formatting the output in the way that my lecturer wants. In the question below, I have no problems with parts 1 and 2 but am completely stuck on how I should get my output into 5 columns using JOptionPane.showMessageDialog (here is a link to how he wants it to look).

Question:

  1. Write a program that will calculate and output multiples of a particular value up to a particular limit.

  2. Your program must firstly ask the user to enter a positive integer value followed by an upper limit (in separate input dialog boxes).

  3. It should be noted that the format of your output must correspond exactly to the format of the output of mine (note that the multiples appear in 5 columns).

My lecturer suggested making a new variable 'output', setting it to an empty string, and then putting my output from the for loop into this variable. I have tried using ...

  • "\n"

  • "\n\t\t\t"

  • " " + "\t\t\t" + " " + "\t\t\t" + "\n" //etc, etc

... to no avail. We must use a for loop for this exercise. Could anyone offer me any suggestions? Thank you.

import javax.swing.JOptionPane;
public class Exercise3
{
    public static void main( String[] args )
    {
        String output = "";
        String posInt = JOptionPane.showInputDialog( "Please enter a positive whole number:" );
        int pos = Integer.parseInt( posInt );
    
        String upperLim = JOptionPane.showInputDialog( "Please enter an upper limit:" );
        int uLim = Integer.parseInt( upperLim );
        
        for( int i = pos; i <= uLim; i += pos )
        {
            output += i;
        }

        JOptionPane.showMessageDialog( null, "The multiples of " + pos + " between " + pos + " and " + uLim + " are: " + output );
    }
}

r/javahelp • • Jun 26 '19

Want to learn streams and collections, help!

16 Upvotes

what is the Best way to learn and implement streams in Java?


r/javahelp • • May 03 '19

Homework How exactly do I make a GUI? (Java)

16 Upvotes

Hi guys, for the end of the year I need to make a GUI. The teacher doesn’t tell you how but wants you to do it on your own and gave us basic instructions but didn’t tell me WHERE I actually make it. Do I use netbeans to do it or Alice? That’s all I need honestly. From there i can manage by myself. Thank you.

Also this is an intro to java class so nothing fancy.


r/javahelp • • Jan 15 '19

Help to structure simple java game to MVC

16 Upvotes

I am doing this project and want to structure it as the MVC model, i just cant to seem to understand how, help would be appreciated

my code here : https://github.com/tegstbesged/snake-simpel.git


r/javahelp • • Jan 04 '19

Solved When is a loop o(1)?

16 Upvotes

I'm super confused about when a for loop/while loop is o(1).

For instance if I have an array A= {1,2,3,4,5};

for(int i = 0; i< A.length; i++){
//append to string or something
}

This loop would be O(n) ? I understand if I loop: for(int i = 0; i< 100; i++){ //append to string or something }

This is constant time but when else is a loop constant time?


r/javahelp • • Jun 26 '18

What would you like to learn about Java Virtual Machine (JVM)?

16 Upvotes

I am working on a video course for Java Virtual Machine. I wanted to take feedback on what are some of the things people find challenging about JVM. I would request 30 seconds of your time to contribute to this survey.

https://goo.gl/forms/3QOQBfjedNVpxhOl2


r/javahelp • • Jun 12 '18

Can't wrap my head around Polymorphism

16 Upvotes

Read some and watched some about it, but I can't seem to quite get it, and the people of javahelp never disappoint.

I don't even think I understand it well enough to ask a proper question about it. But, is it only useful for method overriding?

And what is the difference between referencing a superclass while making a new instance of subclass, rather than just going 1:1?

as in

Superclass class1 = new Subclass(); // this is considered polymorphism

Subclass class2 = new Subclass(); // What is the advantage of the above?

The way i Interpret this, is that method overriding wont work on class 2, since if you don't override Superclass method, it wouldn't have anything to fall back on? But a class2 method would still override the superclass method right?

I'm just really confused about this topic still, so I can't explain very well what I don't understand.


r/javahelp • • May 29 '17

No help really needed. Just thought I'd share the Tic Tac Toe game that people on this sub helped me build. I hope you guys enjoy it and if you do see something that code be streamlined better or coded in a better-practice way, I'm all ears.

16 Upvotes

There are a few things that are coded a little awkwardly. It's due to a bug or two I was experiencing. These are mentioned in the comments. If you see a better way and there are no comments, please do mention that.

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.EventQueue;
import java.awt.Font;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Arrays;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.SwingConstants;
import javax.swing.border.EmptyBorder;
import javax.swing.border.LineBorder;

public class TicTacToe extends JFrame {

private JPanel contentPane;
private JTextField txtPlayerX;
private JTextField txtPlayerO;
private JTextField txtxPoints;
private JTextField txtoPoints;
private String[] gameBoard = new String[9];
private String turn = "X";
private JButton btn1x1;
private JButton btn1x2;
private JButton btn1x3;
private JButton btn2x1;
private JButton btn2x2;
private JButton btn2x3;
private JButton btn3x1;
private JButton btn3x2;
private JButton btn3x3;
private JFrame frame;
private int xScore;
private int oScore;
private String won;

/**
 * Launch the application.
 */
public static void main(String[] args) {
	EventQueue.invokeLater(new Runnable() {
		public void run() {
			try {
				TicTacToe frame = new TicTacToe();
				frame.setVisible(true);
			} catch (Exception e) {
				e.printStackTrace();
			}
		}
	});
}

/**
 * When the Reset button is pressed.  Clears the board and creates a new game where the 
 * loser of the previous game goes first.
 */
public void Reset(){
	if(won != null){
		if(won.equals("X")){
			turn = "O";
		
		}else if(won.equals("O")){
			turn = "X";
		}
	}
	
	Arrays.fill(gameBoard, null);
	btn1x1.setText(null);
	btn1x2.setText(null);
	btn1x3.setText(null);
	btn2x1.setText(null);
	btn2x2.setText(null);
	btn2x3.setText(null);
	btn3x1.setText(null);
	btn3x2.setText(null);
	btn3x3.setText(null);
	
	
}

/**
 * Determines whose turn it is.
 */
public void nextTurn(){
	if (turn.equalsIgnoreCase("X")){
		turn = "O";	
	}else{
		turn = "X";
	}
}

/**
 * Putting an 'X' or 'O' in the clicked box and what happens afterwards.
 * 
 * @param btn.  The box on the board that was clicked.
 * @param i. The location of gameBoard[] that corresponds to the box clicked.
 * @param turn.  Whether an X or and O gets placed in the box and array location. 
 */
public void markSquare(JButton btn, int i, String turn){	
	while(gameBoard[i] == null){
		if(this.turn.equalsIgnoreCase("X")){
			btn.setForeground(Color.RED);
		}else{
			btn.setForeground(Color.BLUE);
		}
		gameBoard[i] = this.turn;
		btn.setText(gameBoard[i]);
		nextTurn();
		winGame();
	}
	
}

/**
 * Giving the winner of the round a point. Turn is set to null to prevent more letters
 * being added after a winner is declared.  The String won is set due to an error
 * that was causing the program to automatically click the winning box at the start of
 * the next round for the losing side.
 * 
 * i.e. if box 2x3 won the game for 'X', the moment after the game reset, the program
 * would automatically select box 2x3 for 'O' and that would count as O's turn.
 * 
 * @param winner.  The player that won the round.
 */
public void addPoint(String winner){
	if(winner.equalsIgnoreCase("X")){
		xScore++;
		txtxPoints.setText(String.valueOf(xScore));
		won = "X";
	
	}else if(winner.equalsIgnoreCase("O")){
		oScore++;
		txtoPoints.setText(String.valueOf(oScore));
		won = "O";
	}
	turn = null;
}

/**
 * How the game can be won.
 */
public void winGame(){
	
	if(gameBoard[0] == gameBoard[1] && gameBoard[1] == gameBoard[2] && gameBoard[0] != null){
		 JOptionPane.showMessageDialog(frame, gameBoard[0] + " wins", "Tic Tac Toe", 
				 JOptionPane.INFORMATION_MESSAGE);
		 addPoint(gameBoard[0]);		 
	}
	
	if(gameBoard[3] == gameBoard[4] && gameBoard[4] == gameBoard[5] && gameBoard[3] != null){
		 JOptionPane.showMessageDialog(frame, gameBoard[3] + " wins", "Tic Tac Toe", 
				 JOptionPane.INFORMATION_MESSAGE);
		 addPoint(gameBoard[3]);
	}
	
	if(gameBoard[6] == gameBoard[7] && gameBoard[7] == gameBoard[8] && gameBoard[6] != null){
		 JOptionPane.showMessageDialog(frame, gameBoard[6] + " wins", "Tic Tac Toe", 
				 JOptionPane.INFORMATION_MESSAGE);
		 addPoint(gameBoard[6]);
	}
	
	if(gameBoard[0] == gameBoard[3] && gameBoard[3] == gameBoard[6] && gameBoard[0] != null){
		 JOptionPane.showMessageDialog(frame, gameBoard[0] + " wins", "Tic Tac Toe", 
				 JOptionPane.INFORMATION_MESSAGE);
		 addPoint(gameBoard[0]);
	}
	
	if(gameBoard[1] == gameBoard[4] && gameBoard[4] == gameBoard[7] && gameBoard[1] != null){
		 JOptionPane.showMessageDialog(frame, gameBoard[1] + " wins", "Tic Tac Toe", 
				 JOptionPane.INFORMATION_MESSAGE);
		 addPoint(gameBoard[1]);
	}
	
	if(gameBoard[2] == gameBoard[5] && gameBoard[5] == gameBoard[8] && gameBoard[2] != null){
		 JOptionPane.showMessageDialog(frame, gameBoard[2] + " wins", "Tic Tac Toe", 
				 JOptionPane.INFORMATION_MESSAGE);
		 addPoint(gameBoard[2]);
	}
	
	if(gameBoard[0] == gameBoard[4] && gameBoard[4] == gameBoard[8] && gameBoard[0] != null){
		 JOptionPane.showMessageDialog(frame, gameBoard[0] + " wins", "Tic Tac Toe", 
				 JOptionPane.INFORMATION_MESSAGE);
		 addPoint(gameBoard[0]);
	}
	
	if(gameBoard[2] == gameBoard[4] && gameBoard[4] == gameBoard[6] && gameBoard[2] != null){
		 JOptionPane.showMessageDialog(frame, gameBoard[2] + " wins", "Tic Tac Toe", 
				 JOptionPane.INFORMATION_MESSAGE);
		 addPoint(gameBoard[2]);
	}
}

/**
 * Create the frame.
 */
public TicTacToe() {
	setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	setBounds(100, 100, 1200, 600);
	contentPane = new JPanel();
	contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
	setContentPane(contentPane);
	contentPane.setLayout(new BorderLayout(0, 0));
	
	JPanel panel = new JPanel();
	panel.setBorder(new LineBorder(new Color(0, 0, 0), 2));
	contentPane.add(panel, BorderLayout.CENTER);
	panel.setLayout(new GridLayout(3, 5, 2, 2));
	
	JPanel panel_1 = new JPanel();
	panel_1.setBorder(new LineBorder(new Color(0, 0, 0), 2));
	panel.add(panel_1);
	panel_1.setLayout(new BorderLayout(0, 0));
	
	btn1x1 = new JButton("");
	btn1x1.setFont(new Font("Tahoma", Font.BOLD, 92));
	btn1x1.addActionListener(new ActionListener() {
		public void actionPerformed(ActionEvent e) {
			markSquare(btn1x1, 0, turn);
		}
	});
	panel_1.add(btn1x1, BorderLayout.CENTER);
	
	JPanel panel_2 = new JPanel();
	panel_2.setBorder(new LineBorder(new Color(0, 0, 0), 2));
	panel.add(panel_2);
	panel_2.setLayout(new BorderLayout(0, 0));
	
	btn1x2 = new JButton("");
	btn1x2.setFont(new Font("Tahoma", Font.BOLD, 92));
	btn1x2.addActionListener(new ActionListener() {
		public void actionPerformed(ActionEvent e) {
			markSquare(btn1x2, 1, turn);
		}
	});
	panel_2.add(btn1x2, BorderLayout.CENTER);
	
	JPanel panel_3 = new JPanel();
	panel_3.setBorder(new LineBorder(new Color(0, 0, 0), 2));
	panel.add(panel_3);
	panel_3.setLayout(new BorderLayout(0, 0));
	
	btn1x3 = new JButton("");
	btn1x3.setFont(new Font("Tahoma", Font.BOLD, 92));
	btn1x3.addActionListener(new ActionListener() {
		public void actionPerformed(ActionEvent e) {
			markSquare(btn1x3, 2, turn);
		}
	});
	panel_3.add(btn1x3, BorderLayout.CENTER);
	
	JPanel panel_4 = new JPanel();
	panel_4.setBorder(new LineBorder(new Color(0, 0, 0), 2));
	panel.add(panel_4);
	panel_4.setLayout(new BorderLayout(0, 0));
	
	txtPlayerX = new JTextField();
	txtPlayerX.setHorizontalAlignment(SwingConstants.CENTER);
	txtPlayerX.setText("Player X:");
	txtPlayerX.setFont(new Font("Tahoma", Font.BOLD, 45));
	panel_4.add(txtPlayerX, BorderLayout.CENTER);
	txtPlayerX.setColumns(10);
	
	JPanel panel_7 = new JPanel();
	panel_7.setBorder(new LineBorder(new Color(0, 0, 0), 2));
	panel.add(panel_7);
	panel_7.setLayout(new BorderLayout(0, 0));
	
	txtxPoints = new JTextField();
	txtxPoints.setText("0");
	txtxPoints.setHorizontalAlignment(SwingConstants.CENTER);
	txtxPoints.setFont(new Font("Tahoma", Font.BOLD, 50));
	panel_7.add(txtxPoints, BorderLayout.CENTER);
	txtxPoints.setColumns(10);
	
	JPanel panel_5 = new JPanel();
	panel_5.setBorder(new LineBorder(new Color(0, 0, 0), 2));
	panel.add(panel_5);
	panel_5.setLayout(new BorderLayout(0, 0));
	
	btn2x1 = new JButton("");
	btn2x1.setFont(new Font("Tahoma", Font.BOLD, 92));
	btn2x1.addActionListener(new ActionListener() {
		public void actionPerformed(ActionEvent e) {
			markSquare(btn2x1, 3, turn);
		}
	});
	panel_5.add(btn2x1, BorderLayout.CENTER);
	
	JPanel panel_8 = new JPanel();
	panel_8.setBorder(new LineBorder(new Color(0, 0, 0), 2));
	panel.add(panel_8);
	panel_8.setLayout(new BorderLayout(0, 0));
	
	btn2x2 = new JButton("");
	btn2x2.setFont(new Font("Tahoma", Font.BOLD, 92));
	btn2x2.addActionListener(new ActionListener() {
		public void actionPerformed(ActionEvent e) {
		markSquare(btn2x2, 4, turn);
		}
	});
	panel_8.add(btn2x2, BorderLayout.CENTER);
	
	JPanel panel_9 = new JPanel();
	panel_9.setBorder(new LineBorder(new Color(0, 0, 0), 2));
	panel.add(panel_9);
	panel_9.setLayout(new BorderLayout(0, 0));
	
	btn2x3 = new JButton("");
	btn2x3.setFont(new Font("Tahoma", Font.BOLD, 92));
	btn2x3.addActionListener(new ActionListener() {
		public void actionPerformed(ActionEvent e) {
			markSquare(btn2x3, 5, turn);
		}
	});
	panel_9.add(btn2x3, BorderLayout.CENTER);
	
	JPanel panel_6 = new JPanel();
	panel_6.setBorder(new LineBorder(new Color(0, 0, 0), 2));
	panel.add(panel_6);
	panel_6.setLayout(new BorderLayout(0, 0));
	
	txtPlayerO = new JTextField();
	txtPlayerO.setHorizontalAlignment(SwingConstants.CENTER);
	txtPlayerO.setFont(new Font("Tahoma", Font.BOLD, 45));
	txtPlayerO.setText("Player O:");
	panel_6.add(txtPlayerO, BorderLayout.CENTER);
	txtPlayerO.setColumns(10);
	
	JPanel panel_10 = new JPanel();
	panel_10.setBorder(new LineBorder(new Color(0, 0, 0), 2));
	panel.add(panel_10);
	panel_10.setLayout(new BorderLayout(0, 0));
	
	txtoPoints = new JTextField();
	txtoPoints.setHorizontalAlignment(SwingConstants.CENTER);
	txtoPoints.setText("0");
	txtoPoints.setFont(new Font("Tahoma", Font.BOLD, 50));
	panel_10.add(txtoPoints, BorderLayout.CENTER);
	txtoPoints.setColumns(10);
	
	JPanel panel_11 = new JPanel();
	panel_11.setBorder(new LineBorder(new Color(0, 0, 0), 2));
	panel.add(panel_11);
	panel_11.setLayout(new BorderLayout(0, 0));
	
	btn3x1 = new JButton("");
	btn3x1.setFont(new Font("Tahoma", Font.BOLD, 92));
	btn3x1.addActionListener(new ActionListener() {
		public void actionPerformed(ActionEvent e) {
			markSquare(btn3x1, 6, turn);
		}
	});
	panel_11.add(btn3x1, BorderLayout.CENTER);
	
	JPanel panel_12 = new JPanel();
	panel_12.setBorder(new LineBorder(new Color(0, 0, 0), 2));
	panel.add(panel_12);
	panel_12.setLayout(new BorderLayout(0, 0));
	
	btn3x2 = new JButton("");
	btn3x2.setFont(new Font("Tahoma", Font.BOLD, 92));
	btn3x2.addActionListener(new ActionListener() {
		public void actionPerformed(ActionEvent e) {
			markSquare(btn3x2, 7, turn);
		}
	});
	panel_12.add(btn3x2, BorderLayout.CENTER);
	
	JPanel panel_13 = new JPanel();
	panel_13.setBorder(new LineBorder(new Color(0, 0, 0), 2));
	panel.add(panel_13);
	panel_13.setLayout(new BorderLayout(0, 0));
	
	btn3x3 = new JButton("");
	btn3x3.setFont(new Font("Tahoma", Font.BOLD, 92));
	btn3x3.addActionListener(new ActionListener() {
		public void actionPerformed(ActionEvent e) {
			markSquare(btn3x3, 8, turn);	
		}
	});
	panel_13.add(btn3x3, BorderLayout.CENTER);
	
	JPanel panel_14 = new JPanel();
	panel_14.setBorder(new LineBorder(new Color(0, 0, 0), 2));
	panel.add(panel_14);
	panel_14.setLayout(new BorderLayout(0, 0));
	
	JButton btnReset = new JButton("RESET");
	btnReset.addActionListener(new ActionListener() {
		public void actionPerformed(ActionEvent arg0) {
			Reset();
		}
	});
	btnReset.setFont(new Font("Tahoma", Font.BOLD, 35));
	panel_14.add(btnReset, BorderLayout.CENTER);
	
	JPanel panel_15 = new JPanel();
	panel_15.setBorder(new LineBorder(new Color(0, 0, 0), 2));
	panel.add(panel_15);
	panel_15.setLayout(new BorderLayout(0, 0));
	
	JButton btnExit = new JButton("EXIT");
	btnExit.addActionListener(new ActionListener() {
		private JFrame frame;

		public void actionPerformed(ActionEvent e) {
			frame = new JFrame("Exit");
			if(JOptionPane.showConfirmDialog(frame, "Do you want to quit?", "Tic Tac Toe",
					JOptionPane.YES_NO_OPTION) == JOptionPane.YES_NO_OPTION){
				System.exit(0);
			}
			
		}
	});
	btnExit.setFont(new Font("Tahoma", Font.BOLD, 35));
	panel_15.add(btnExit, BorderLayout.CENTER);
}

}