Search:

Type: Posts; User: kinkita

Search: Search took 0.07 seconds.

  1. Replies
    11
    Views
    2,321

    Re: Removing a JPanel from another class

    Yes that works but the problem I am having is changing the cardlayout from another class, that is a different file.

    I modifyed your code.

    main code


    package cardlayouttest;
    import...
  2. Replies
    11
    Views
    2,321

    Re: Removing a JPanel from another class

    I managed to acces the class method "changeToGame". I added a System.out text to see if it worked and it did, but when I add the code "cardlayout.show(cardPanel, "2");" this error message comes up:
  3. Replies
    11
    Views
    2,321

    Re: Removing a JPanel from another class

    I created the method "changeToGame()" in the class "TicTacToe" but I can't manage to acces it through other classes.

    I can't do: TicTacToe tac = new TicTacToe();

    tac.changeTogame();

    since...
  4. Replies
    11
    Views
    2,321

    Re: Removing a JPanel from another class

    Sorry it took me a while to respond(my internet was just too slow)

    Okey looked at the cardlayout functions, found an example, and now I have this:

    main code:

    package tictactoe;
    import...
  5. Replies
    11
    Views
    2,321

    Removing a JPanel from another class

    Hello everyone, I have once again aproached a problem on my journey to Java.

    What I want to do:
    I want to be able to remove a Jpanel from the main class but with another class. I'll try to show...
Results 1 to 5 of 5