By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,071 Members | 1,244 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,071 IT Pros & Developers. It's quick & easy.

JTextArea listener

P: n/a
Hello, i am relatively new to programming, Java being the first
language im learning. At the moment im having trouble changing the
setEnable value of a button, relative to the state of a JTextArea, ie
setEnable(false) if the JTextArea is empty, and once somthing IS typed
into the TextArea the button is Enabled, i cant find any listeners for
JTextArea which help me, what ive got now is ok (button dosnt do
anything is the Area is empty) but not quite wot i want, help
appreciated :D
Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
ne*************@hotmail.com (- ions) wrote in message news:<47**************************@posting.google. com>...
Hello, i am relatively new to programming, Java being the first
language im learning. At the moment im having trouble changing the
setEnable value of a button, relative to the state of a JTextArea, ie
setEnable(false) if the JTextArea is empty, and once somthing IS typed
into the TextArea the button is Enabled, i cant find any listeners for
JTextArea which help me, what ive got now is ok (button dosnt do
anything is the Area is empty) but not quite wot i want, help
appreciated :D

Always remember to check the methods inherited from subclasses.
In this case JTextArea is a subclass of Component, JComponent
and JTextComponent. All of these have listener registration
methods for various types of AWT/Swing events.
-FISH- ><>
Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.