My job is to retrieve the value of the text field and click on the button to display it in an alert box How to prepare a click event for a button in the swing?
For this, you need to use, for example:
Jebton B = New Pocket ("push me"); B.addActionListener (New Executioner) {@ Override Public Zero Action Perfume (Action Event E) {// Your Action}});
To prepare the click event program, you can use the JButton
method: b.doClick ();
Comments
Post a Comment