Search:

Type: Posts; User: Nemesis89

Search: Search took 0.15 seconds.

  1. Replies
    2
    Views
    3

    Managing Audio Files In Java

    Hi guys!
    I'm doing a little game in Java and I would like to insert a background music managed by a JButton. When the button is pressed, the music starts and then, to stop it, the button is pressed...
  2. Replies
    6
    Views
    143

    Re: Make A Text Blinking Effect

    Thanks for the tips. Unfortunately it is not easy to understand the problem. I can say that this class is activated once the player reaches a maximum score in the GamePanel. Then you will have the...
  3. Replies
    6
    Views
    143

    Re: Make A Text Blinking Effect

    This is the panel of the winner after the game :


    import java.awt.Dimension;
    import java.awt.Graphics;
    import java.awt.Image;
    import java.awt.Insets;
    import java.awt.event.ActionEvent;...
  4. Replies
    6
    Views
    143

    Make A Text Blinking Effect

    Hello! In carrying out my little game I made a panel "Winner" in which I have two JButton plus I would like to add a blinking text to indicate the victory of the player("You win!").
    Currently this...
  5. Replies
    15
    Views
    345

    [SOLVED] Re: Create A Countdown In Java

    I solved:


    long totalSeconds = 150;
    long minutes = totalSeconds / 60;
    long seconds = totalSeconds % 60;
    //minutes -> 2
    //seconds -> 30
  6. Replies
    15
    Views
    345

    [SOLVED] Re: Create A Countdown In Java

    I created my countdown thread!
    The manufacturer of the thread as a parameter will have the time in seconds (eg 120) and then be shown divided into minutes and seconds. In this case, doing 120/60 I...
  7. Replies
    15
    Views
    345

    [SOLVED] Re: Create A Countdown In Java

    And the switch panel who should do it?
    Could you show me an example if possible?
  8. Replies
    15
    Views
    345

    [SOLVED] Re: Create A Countdown In Java

    With regard to the ActionListener I would like to add it to the JButton "Start Game" .


    public String show="";
    JButton startGame = new JButton(new ImageIcon("start.png");
    startGame...
  9. Replies
    15
    Views
    345

    [SOLVED] Re: Create A Countdown In Java

    This is the class Game



    public Game(final MainFrame mainFrame, final GameManager gameManager, ImageProvider imageProvider) {
    this.setLayout(null);
    dragX=0;
    dragY=0;...
  10. Replies
    15
    Views
    345

    [SOLVED] Re: Create A Countdown In Java

    By studying the example in the link Swing Timers - Tutorials - Static Void Games

    I noticed that the class "MyListener" implements ActionListener. In my case I will have action on the part of...
  11. Replies
    15
    Views
    345

    [SOLVED] Re: Create A Countdown In Java

    Unfortunately I could not write anything yet because I do not know where to start.
    Thanks anyway for the suggestion
  12. Replies
    15
    Views
    345

    [SOLVED] Create A Countdown In Java

    Hi, I'm making a small play in java in which you have a limited time to make as many moves as possible (with the aim of achieving a maximum score), like this: ...
  13. Replies
    8
    Views
    181

    Re: Change The Mouse Cursor In Java

    The example is very clear, that's fine and I understand, but do you think I can / is correct that I want my object point in the red dot in the image?
    And if I can, how do I determine the point (for...
  14. Replies
    8
    Views
    181

    Re: Change The Mouse Cursor In Java

    I agree with what you said.
    This image is loaded and displayed as a normal cursor.
    If I had this same image of size 32x32 I could have the point of hotspots at the point indicated by me in the...
  15. Replies
    8
    Views
    181

    Re: Change The Mouse Cursor In Java

    Now it is visible?

    2730
  16. Replies
    8
    Views
    181

    Re: Change The Mouse Cursor In Java

    Thanks anyway for the clarification, but I don't want the cursor has this dimension, I wrote for information, in fact, writing code on the back has been adapted to the classical size of the cursor....
  17. Replies
    8
    Views
    181

    Change The Mouse Cursor In Java

    Hello! I'm doing a little play and among the many things I decided to change the mouse cursor based on the theme of the game.
    This is the code that I wrote for the declaration of the cursor:


    ...
  18. Thread: Hi everyone

    by Nemesis89
    Replies
    1
    Views
    100

    Hi everyone

    Hi programmers! I just signed up to the site. I hope to compare with you and improve my skills as a programmer Java. :-h
Results 1 to 18 of 18