Search:

Type: Posts; User: gargamel7

Page 1 of 3 1 2 3

Search: Search took 0.13 seconds.

  1. Replies
    23
    Views
    2,316

    Re: Changing from a screen to another!

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

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

    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,316

    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,316

    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,316

    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,316

    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,316

    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,316

    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,316

    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,316

    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...
  11. Replies
    2
    Views
    1,571

    Re: JFrame invisible border issue

    I forgot the transparent parts of the images. My bad. :/
  12. Replies
    2
    Views
    1,571

    JFrame invisible border issue

    Hello!

    Iīve a little issue I would like to get solved.

    On my JFrame there seems to be like an invisible border around the frame. So when something should be invisible or stop at ykoord = 0...
  13. Replies
    24
    Views
    3,030

    Re: Drawing images with different angles

    As it is now, the hour-pointer is updated 1 degree every 120 s, the minute-pointer is updated 6 degrees every 60 s, and the second-pointer is updated 6 degrees every second.

    It should be able to...
  14. Replies
    24
    Views
    3,030

    Re: Drawing images with different angles

    Ok so hereīs a modified repost to clearify!

    Actually, (I noticed this now when running) the clock is not alright when the order of the calls is "correct", the minute-pointer's angle is not right...
  15. Replies
    24
    Views
    3,030

    Re: Drawing images with different angles

    You mean that I change the pRose to pHour for example? And why do you call them hands in the first place?
  16. Replies
    24
    Views
    3,030

    Re: Drawing images with different angles

    Yes, that sounds true.

    Actually, (I noticed this now when running) the clock is not alright when the order of the calls is "correct", the minute-pointer's angle is not right (the other pointer's...
  17. Replies
    24
    Views
    3,030

    Re: Drawing images with different angles

    Ok, thanks!



    What I see is that all the pointers get their initial angle. After 1 second when the second-pointer's position updates, all of the three pointers are updated just as the...
  18. Replies
    24
    Views
    3,030

    Re: Drawing images with different angles

    Could you please help me with how to code this, Iīm not sure how.
  19. Replies
    24
    Views
    3,030

    Re: Drawing images with different angles

    Thanks for all the help and tips you have given me. Iīve managed to fix it now, but thereīs one thing I really donīt understand.

    Everything works fine as it is coded now, but if I change the order...
  20. Replies
    24
    Views
    3,030

    Re: Drawing images with different angles

    The code I have is also rotating an image just the way I want, the problem is when painting multiple images with different getAngle()...
  21. Replies
    24
    Views
    3,030

    Re: Drawing images with different angles

    I donīt know how to do what you wanted me to try Kevin, but here is a try: (I know it wont compile, and I know itīs all wrong probably, but please tell me how to do it correctly).

    public void...
  22. Replies
    24
    Views
    3,030

    Re: Drawing images with different angles

    Thanks, but thatīs with just one image. Iīve managed to modify one picture myself but Iīm struggling modifying more than one pic in the same paint() method.
  23. Replies
    24
    Views
    3,030

    Re: Drawing images with different angles

    What tutorial? I donīt find it...
  24. Replies
    24
    Views
    3,030

    Drawing images with different angles

    Hello!

    Iīve got a problem when I try to paint my clock which consists of a wheel and three pointers in the shapes of different flowers (pink, weird, rose). The wheel is drawn as I want. And the...
  25. Replies
    6
    Views
    1,488

    Re: getResource()-error

    The getResource() method returns the fileName
    And yes, the file exists.

    I thinks itīs quite weird since all I did was to modify the pics from jpg to gif, (deleted the jpgs and inserted the gifs...
Results 1 to 25 of 51
Page 1 of 3 1 2 3