Here you can find the source of doButtonClick(JButton button)
Parameter | Description |
---|---|
button | button component |
public static void doButtonClick(JButton button)
//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); } }