Search:

Type: Posts; User: Nemesis89

Search: Search took 0.10 seconds.

  1. Replies
    15
    Views
    1,524

    [SOLVED] Re: Create A Countdown In Java

    I solved:


    long totalSeconds = 150;
    long minutes = totalSeconds / 60;
    long seconds = totalSeconds % 60;
    //minutes -> 2
    //seconds -> 30
  2. Replies
    15
    Views
    1,524

    [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...
  3. Replies
    15
    Views
    1,524

    [SOLVED] Re: Create A Countdown In Java

    And the switch panel who should do it?
    Could you show me an example if possible?
  4. Replies
    15
    Views
    1,524

    [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...
  5. Replies
    15
    Views
    1,524

    [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;...
  6. Replies
    15
    Views
    1,524

    [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...
  7. Replies
    15
    Views
    1,524

    [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
  8. Replies
    15
    Views
    1,524

    [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: ...
Results 1 to 8 of 8