Search:

Type: Posts; User: gargamel7

Search: Search took 0.07 seconds.

  1. Replies
    23
    Views
    2,349

    Re: Changing from a screen to another!

    Hereīs an SSCCE:
    http://www.filedropper.com/spacesscce

    Thanks for helping!
  2. Replies
    23
    Views
    2,349

    Re: Changing from a screen to another!

    Thanks for the tips Spidey! Actually, I have fixed the screen-switching issue. The thing left is that the game-room donīt listen to user inputs. Anyone who may know what the problem is?
  3. Replies
    23
    Views
    2,349

    Re: Changing from a screen to another!

    Nothing happened when adding requestFocusInWindow() in the game-class-constructor. Yes it works without the CardLayout and yes, it works as the default visible card.

    Hereīs the game-class. Itīs...
  4. Replies
    23
    Views
    2,349

    Re: Changing from a screen to another!

    Thanks! I followed the tutorial and made the switching work. But. When the screen is switched from menu-room to game-room, user inputs donīt work in game-room. Everything is painted correctly,...
  5. Replies
    23
    Views
    2,349

    Re: Changing from a screen to another!

    What tutorial did you give me?

    The cl.show(cardPanel, "" + game); came from cl.show(cardPanel, "" + (currentCard)); in this tutorial:
    Java Tips - How to use AWT CardLayout

    Since we are very...
  6. Replies
    23
    Views
    2,349

    Re: Changing from a screen to another!

    The code combiles without errors so itīs working, but it isnīt done. I wanted to know if everything was correctly done, and not full of code-bits that was unnecessary.

    Now my next question is how...
  7. Replies
    23
    Views
    2,349

    Re: Changing from a screen to another!

    Thanks for the tip, but this is just about common screenswitching thatīs seen in most games. :)
  8. Replies
    23
    Views
    2,349

    Re: Changing from a screen to another!

    The room-objects are a menu class and a game class, both are extending JPanel.


    In the Menu-room there are a go-button (think of the go-button as a JPanel). I need to add this JPanel called p to...
  9. Replies
    23
    Views
    2,349

    Re: Changing from a screen to another!

    Every tutorial Iīve found about CardLayout just demonstrates its use within one class that has some JPanels set up there. I donīt get how I do to integrate my room-objects with CardLayout. Please...
  10. Replies
    23
    Views
    2,349

    Changing from a screen to another!

    Hello!

    Iīm making a simple game which consists of a Menu-screen with some images and a go-button. If you click on the go-button with the mouse you will be taken to the Game-room where there are...
Results 1 to 10 of 10