Example usage for javax.swing JButton setMultiClickThreshhold

List of usage examples for javax.swing JButton setMultiClickThreshhold

Introduction

In this page you can find the example usage for javax.swing JButton setMultiClickThreshhold.

Prototype

public void setMultiClickThreshhold(long threshhold) 

Source Link

Document

Sets the amount of time (in milliseconds) required between mouse press events for the button to generate the corresponding action events.

Usage

From source file:com.aw.swing.mvp.Presenter.java

private void addActionToJButton(JButton jButton, final com.aw.swing.mvp.action.Action action) {
    jButton.putClientProperty(BindingComponent.ATTR_ACTION, action.getId().asStringWithoutSeparator());
    jButton.setMultiClickThreshhold(500);
    jButton.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            executeAction(action);//from  ww w . j a v a  2s  .c  o m
        }
    });
}