Add Word to TextField with Button | Java Swing
Add Word to TextField with Button | Java Swing
________________________________________________
1.Make project like this:
2.Code for "Hello", "Java", "Welcome", "Programming" buttons:
private void btnHelloActionPerformed(java.awt.event.ActionEvent evt) { txtWord.setText("Hello"); } private void btnJavaActionPerformed(java.awt.event.ActionEvent evt) { txtWord.setText("Java"); } private void btnWelcomeActionPerformed(java.awt.event.ActionEvent evt) { txtWord.setText("Welcome"); } private void btnProgrammingActionPerformed(java.awt.event.ActionEvent evt) { txtWord.setText("Programming"); }
_____________________________________________
Dark Hers
YouTube
https://instagram.com/darkhers
https://www.facebook.com/darkhers
TikTok
https://www.tiktok.com/@darkhers
https://www.pinterest.co.uk/darkhers
Comments
Post a Comment