I want to call
public TicTacToe()
{
panel = new JPanel();
panel.setLayout(new GridLayout(3,4));
this.add(panel);
button = new JButton[9];
for(int i = 0; i <= 8; i++){
...
Type: Posts; User: jeboi
I want to call
public TicTacToe()
{
panel = new JPanel();
panel.setLayout(new GridLayout(3,4));
this.add(panel);
button = new JButton[9];
for(int i = 0; i <= 8; i++){
...
I've tried combining them in 1 program but there's an error
1 error found:
File: E:\FinalProject1.java [line: 54]
Error: The method theMethod() is undefined for the type FinalProject1.TicTacToe
...
It would be like this
String click = e.getActionCommand();
if (click.equals("Versus Mode"))
{
TicTacToe ttt =new TicTacToe();
ttt.theMethod();
}
in the menubar if a user clicks the 'Game' 2 options will come out
Versus mode and Versus AI
If the user will click the 'Versus Mode' TicTacToe.java will appear
If the user will click the...
I have these 2 programs:
TicTacToe 2PLAYERS
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class TicTacToe extends JFrame implements ActionListener
{
JPanel...
e.g.
I'll call TicTacToe() to be put here:
String arg = e.getActionCommand();
if (arg == "Versus Mode")
{
}
I did what you ask but how can i call two java programs
e.g.
If I press "Versus Mode" = TicTacToe.java(2 players) will come out
If I press "Versus AI" = TicTacToeAI.java will come out
Need some help
I have 2 java programs
TicTacToe.java(2 player mode)
TicTacToeAI.java(AI mode)
I plan to create a java menu bar for the 2 programs
I have this:
import javax.swing.*;