Java JButton doButtonClick(JButton button)

Here you can find the source of doButtonClick(JButton button)

Description

Performs visually visible click on the button component.

License

Open Source License

Parameter

Parameter Description
button button component

Declaration

public static void doButtonClick(JButton button) 

Method Source Code

//package com.java2s;
/*//from   w w  w.  j  a v  a 2s . co  m
 * Copyright (C) ExBin Project
 *
 * This application or library is free software: you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation, either version 3 of the License,
 * or (at your option) any later version.
 *
 * This application or library is distributed in the hope that it will be
 * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along this application.  If not, see <http://www.gnu.org/licenses/>.
 */

import javax.swing.JButton;

public class Main {
    private static final int BUTTON_CLICK_TIME = 150;

    /**
     * Performs visually visible click on the button component.
     *
     * @param button button component
     */
    public static void doButtonClick(JButton button) {
        button.doClick(BUTTON_CLICK_TIME);
    }
}

Related

  1. buttonState(JButton button, boolean boolArrayOfErrors[])
  2. closeFrame(JButton thisButton)
  3. configureButton(JButton button)
  4. considerarSetaComoTab(JButton comp)
  5. copyButtonWidth(JButton toButton, JButton fromButton)
  6. drawCharacter(JPanel contentPane, ActionListener listener, String url, int x, int y, List buttons)
  7. enableEnter(JButton b)
  8. ensureButtonWidth(JButton button, int width)
  9. enterPressesWhenFocused(final JButton button)