I have two jeframes A, and the text in the BRA is Area. I want to add some text to that textaria by clicking on a button in A Here's my code:
Jebton BTN = new pocket ("text"); BtnButton_1.addActionListener (new executable () {public zero action action (action event e) {b.textArea.setText ("button click");}}); BTN Batton_1.Setbound (10, 45, 89, 23); Add frmA.getContentPane () (btnButton_1) .;
- B is the object of square B
- JTextArea variable name in textArea class B.
< Div class = "post-text" itemprop = "text">
Use the re-color () method of components
Jebton BTN = new pocket ("text"); BtnButton_1.addActionListener (new executable () {public zero action action (b.textArea.setText ("button clicked"); b.frameB.repaint ();}}); BTN Batton_1.Setbound (10, 45, 89, 23); Add frmA.getContentPane () (btnButton_1) .;
Comments
Post a Comment