2 Replies Latest reply on Feb 27, 2013 8:24 AM by Kayaman

    I am new to swing frame work. I have requirement like when clicking the sta

    Madhav.T.Reddy
      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