دوستان سلام
من چطور میتونم در کد زیر پس از کلیک خصوصیت setText از textArea را مقدار دهی کنم؟ آیا اصلاً چنین امکانی هست؟


public class GuiClass {
private JFrame mainFrame;
private JPanel panelcontrol,panel1, panel2, panel3, panel4,panelinfo;
JLabel label = new JLabel("");
public GuiClass() {
panel1 = new JPanel();panel1.setLocation(0, 0); panel1.setSize(400, 700);
panel2 = new JPanel();panel2.setLocation(400, 0);panel2.setSize(400, 700);
panelcontrol = new JPanel();panelcontrol.setBorder(borderG);panelcont rol.setBackground(Color.DARK_GRAY);
mainFrame = new JFrame("Java SWING Examples");mainFrame.setSize(1600, 865);mainFrame.add(panelinfo);mainFrame.add(panel1 );mainFrame.add(panel2);
mainFrame.setLayout(new BorderLayout());mainFrame.add(panelcontrol, BorderLayout.PAGE_END);mainFrame.setVisible(true);
mainFrame.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent windowEvent) {
System.exit(0);
}
});
}
public void setupJTextArea() {
JTextArea textArea = new JTextArea(
"This is an editable JTextArea."
);
textArea.setFont(new Font("Serif", Font.ITALIC, 16));
textArea.setLineWrap(true);
textArea.setWrapStyleWord(true);
JScrollPane areaScrollPane = new JScrollPane(textArea);
areaScrollPane.setVerticalScrollBarPolicy(JScrollP ane.VERTICAL_SCROLLBAR_ALWAYS);
areaScrollPane.setPreferredSize(new Dimension(385, 685));
areaScrollPane.setBorder(
BorderFactory.createCompoundBorder(
BorderFactory.createCompoundBorder(
BorderFactory.createTitledBorder("MY BORADER TITLE"),
BorderFactory.createEmptyBorder(5,5,5,5)),
areaScrollPane.getBorder()));
panel1.add(areaScrollPane);
mainFrame.setVisible(true);
}
private class ButtonClickListener implements ActionListener {
public void actionPerformed(ActionEvent e) {
String command = e.getActionCommand();
if (command.equals("OK")) {
panel1.setToolTipText("Ok Button clicked.");
String CDBMsoapresp = GetSOAPMessage.send();
//***********************************??????????????? ???????????????***********************
textArea.
//***********************************??????????????? ???????????????***********************
} else if (command.equals("Submit")) {
panel1.setToolTipText("Submit Button clicked.");
} else {
panel1.setToolTipText("Cancel Button clicked.");
}
}
}
public static void main(String[] args) {
GuiClass GuiClassByFramePanelControl = new GuiClass();
GuiClassByFramePanelControl.setupJTextArea();
}
}