Search:

Type: Posts; User: jeboi

Search: Search took 0.23 seconds.

  1. Replies
    15
    Views
    591

    Re: CALLING ANOTHER PROGRAM

    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++){
    ...
  2. Replies
    15
    Views
    591

    Re: CALLING ANOTHER PROGRAM

    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
    ...
  3. Replies
    15
    Views
    591

    Re: CALLING ANOTHER PROGRAM

    It would be like this


    String click = e.getActionCommand();
    if (click.equals("Versus Mode"))
    {
    TicTacToe ttt =new TicTacToe();
    ttt.theMethod();
    }
  4. Replies
    15
    Views
    591

    Re: CALLING ANOTHER PROGRAM

    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...
  5. Replies
    15
    Views
    591

    Re: CALLING ANOTHER PROGRAM

    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...
  6. Replies
    15
    Views
    591

    Re: CALLING ANOTHER PROGRAM

    e.g.

    I'll call TicTacToe() to be put here:

    String arg = e.getActionCommand();
    if (arg == "Versus Mode")
    {

    }
  7. Replies
    15
    Views
    591

    Re: CALLING ANOTHER PROGRAM

    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
  8. Replies
    15
    Views
    591

    CALLING ANOTHER PROGRAM

    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.*;
Results 1 to 8 of 8