Article View: borland.public.jbuilder.java.swing
Article #10663Re: Help on using JSplitPane! Please!
From: Ernesto Bascón Pantoja
Date: Thu, 26 Aug 1999 00:00
Date: Thu, 26 Aug 1999 00:00
27 lines
1271 bytes
1271 bytes
Nathan Lai wrote:
> Dear Sir/Madam,
>
> I placed two JPanels on a JSplitPane, one having a JButton and the other
> having a JTextArea. How can I write something onto the JTextArea by clicking
> the JButton?
>
> Thanks in advance!
>
> Nathan
Hi:
There is no difference in the behaviour of the components. So, you must add an
ActionListener to your JButton (actionPerformed(...) event) and writing into
this method the code to write something in the JTextArea.
jButtonName.addActionListener(new java.awt.event.ActionListener()
{
public void actionPerformed(ActionEvent e)
{
jTextAreaName.setText("Hi");
}
});
Technical Details
Message-ID:
<37C54725.E191F4A8@estudiantes.ucbcba.edu.bo>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<7q0u4r$ltr4@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,39062641a3db975a X-Google-Attributes: gid111d45,public From: Ernesto Bascón Pantoja <bascone@estudiantes.ucbcba.edu.bo> Subject: Re: Help on using JSplitPane! Please! Date: 1999/08/26 Message-ID: <37C54725.E191F4A8@estudiantes.ucbcba.edu.bo> X-Deja-AN: 517448560 Content-Transfer-Encoding: 7bit References: <7q0u4r$ltr4@forums.borland.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: UCB Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.swing