Questions tagged [javax.swing.timer]
34 questions
0
votes
1 answer
Timer util wont add a new line for JLabel
Why is that When I user the Timer.util the JLabel wont allign with my String that I inserted in my JTextPane? But when I use the Timer it Allign. I need the Timer.util for my database so it wont lag.
Here is the image when I use the Timer…

Poldz Kerk
- 69
- 3
- 15
-1
votes
2 answers
Can't understand Java Swing Timers. How do I make a 1 time delay?
I need a one-time pause in this program for what I'm trying to do. I display some text in a Java Swing JFrame, repaint shows it, I wait 1.5 sec, then I change the text.
Basically, I started with this:
statusLabel.setText(s); …

CSDragon
- 129
- 1
- 10
-1
votes
1 answer
how to stop a timer with 'if'
hi guys i am new to java... :(
i just want my button(start) to start a timer but i want to stop the timer automatically with 'if' so for example... when a user enters a time and the timer get's to the timer it stops... so far my coding is like…
-3
votes
1 answer
Take input hours mins secs from user and start a countdown in hh:mm:ss format
I am facing problem in starting timer and how to place data into date.
This is my code:
Calendar cl = Calendar.getInstance();
cl.set(Calendar.HOUR, 0);
cl.set(Calendar.MINUTE, 0);
cl.set(Calendar.SECOND, 0);
cl.add(Calendar.HOUR,…