-2

Possible Duplicate:
java button pressed for 3 seconds

I created a button and I want these:

When the user clicks the button, it stays pressed like 3 seconds. After 3 seconds the button should be again look pressable. So the user cannot click the button again without waiting 3 secs. I tried these:

{
 button3 = new Button(c20, SWT.PUSH | SWT.CENTER);
 button3.setText("QUERY");
 button3.setBounds(205, 131, 62, 40);
 button3.addSelectionListener(new SelectionListener() {
    public void widgetSelected(SelectionEvent event) {
        try {
            start_query();
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }

    setPressedIcon();///??
    public void widgetDefaultSelected(SelectionEvent event) {
    }
});

}

Do you have any suggestions?

Community
  • 1
  • 1
hassasin
  • 141
  • 1
  • 1
  • 7
  • 1
    Didn't this fulfill your needs? http://stackoverflow.com/questions/13805482/java-button-pressed-for-3-seconds – Waqas Ilyas Dec 14 '12 at 09:11

0 Answers0