java - How do I Click a JButton without the user Clicking it? -
i have jbutton , when player clicks it tell action listener button clicked. want know is there command or acts if player clicked button.
like tic tac toe, have 2 players can play against each other, want add option computer player vs human player. since computer cant click button, lost.
edit: easy gridbutton2.click() (name of button).click();
pretty much. need use doclick() function. see the api more information.
Comments
Post a Comment