I solved:
long totalSeconds = 150;
long minutes = totalSeconds / 60;
long seconds = totalSeconds % 60;
//minutes -> 2
//seconds -> 30
Type: Posts; User: Nemesis89
I solved:
long totalSeconds = 150;
long minutes = totalSeconds / 60;
long seconds = totalSeconds % 60;
//minutes -> 2
//seconds -> 30
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...
And the switch panel who should do it?
Could you show me an example if possible?
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...
This is the class Game
public Game(final MainFrame mainFrame, final GameManager gameManager, ImageProvider imageProvider) {
this.setLayout(null);
dragX=0;
dragY=0;...
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...
Unfortunately I could not write anything yet because I do not know where to start.
Thanks anyway for the suggestion
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: ...