Answer the question
In order to leave comments, you need to log in
How to hide form jFrame when timer reaches time?
Hello, please help with closing the form on a timer. From one form, the timer starts, on the second form it is shown in jlabel, after a minute the form with jlabel should close, and another form should open.
.
public ActionListener actionListener3 = new ActionListener() {
public void actionPerformed(ActionEvent actionEvent) {
setVisible(false);
for(int h=0;h<1;h++){
System.out.println(jLabel.getText());}
if(tgl.jLabel20.getText().equals("01:00")){
dispose();
timer33.stop(); - таймер с формы запуска таймера
timer34.stop(); - таймер без вывода на jlabel
OpTer(); - метод открытия другой формы ( делает другую форму setVisible(true))
}}};
public javax.swing.Timer timer34 = new javax.swing.Timer(1000, actionListener3);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question