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?
 
     
     
     
     
    