If you don't want to call doClick() on the button, then you can simply call the code called by the button's action. Perhaps you want to have whatever class that holds the actionPerformed method call a public method that other classes can call, and simply call this method.