I am new to swing frame work. I have requirement like when clicking the sta
I am new to swing frame work.
I have requirement like when clicking the start button the actionPerformed need to run continuosly.
My Code look like
public class ClickandTable extends JFrame {
// some swing code
public ClickandTable() {
// some swing code
Start.addActionListener(new ActionListener() {
//final ClickandTable lock = new ClickandTable();
public void actionPerformed(ActionEvent event) {
Start.setEnabled(false);
//My Business logic
"})
}
public static void main(String[] args) {
ClickandTable x = new ClickandTable();
x.setVisible(true);
System.out.println("in main");
}
I want execute actionPerformed(ActionEvent event) on every 2 min till my window closed or stop button click.
Could any one give me idea how can over come this.
Thanks