D
devphylosoff
hej
1.
I have big class extends Frame (electronic clock) and implemented 3
interfaces:WindowListener, ActionListener, MouseListener.
just now I want to add Alarm, which can be closed by any from 2 buttons
clicked by mouse
i think that the best idea is run new thread with countdown to start
alarm (because of avoid alarm check in some states of my clock)
ok, so i will have new thread with countdown
when it reaches 0 alarm function starting and beeper beep through 1
minute or until user press any key (it means : click any button). I
expect MouseListener with my parent class will be sleep in this case.
how write MouseListener in alarm thread?
2.
btw: how use static variable in functions
I receive error while compiling code with that declaration in function
- only in class scope I can do that.
1.
I have big class extends Frame (electronic clock) and implemented 3
interfaces:WindowListener, ActionListener, MouseListener.
just now I want to add Alarm, which can be closed by any from 2 buttons
clicked by mouse
i think that the best idea is run new thread with countdown to start
alarm (because of avoid alarm check in some states of my clock)
ok, so i will have new thread with countdown
when it reaches 0 alarm function starting and beeper beep through 1
minute or until user press any key (it means : click any button). I
expect MouseListener with my parent class will be sleep in this case.
how write MouseListener in alarm thread?
2.
btw: how use static variable in functions
I receive error while compiling code with that declaration in function
- only in class scope I can do that.