473,320 Members | 2,104 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

JTextArea listener

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
1 5972
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Chris Williams | last post by:
I haven't done any Java programming for a good long bit, so this is probably something really silly but anyways, can anyone tell me why my JTextArea is not appearing when I run this? public...
1
by: Cherrish Vaidiyan | last post by:
sir, I have a small error in Listener configuration.I have two system with a database in each. I am using Red Hat 9 and Oracle 9i. so i shall anme the database and system. system 1 - node2 ...
3
by: Bill | last post by:
When vb6 Winsock.RemoteHost is set to "127.0.0.1", c# socket listener cannot hear connect request (my old vb6 winsock listener could hear it...). Why doesn't this work, and is there a work...
1
by: Colibasi | last post by:
I would like to have a JTextArea with a background white and text should be readonly. The way I tried is something like this: JTextArea text = new JTextArea(); text.setEditable(false);...
5
by: mivey4 | last post by:
Hi, First off, I am aware that this is a very heavily documented error and I have done my homework for throughly researching probable causes before deciding to post my problem here. At this point,...
2
by: janaki112 | last post by:
Hi, Can u please help in getting the contents in the JTextArea and writing tat into a file and also writing the contents of the file in to JTextArea???? can u give me the class or function name...
3
by: olafatia | last post by:
import java.awt.*; import javax.swing.*; import java.awt.event.*; import javax.swing.event.*; import java.io.File; import java.util.*; /* <Applet Code="MyPaint.class" width=400 height=400>...
3
by: MiziaQ | last post by:
is there a way to position the jtextarea on the content pane in a certain location ?
1
by: chanshaw | last post by:
Ok my problem is that when it loads the JTextArea, it does not show the full component's width and height. I've tried specifying it with setrow, setcolumn, setprefferedsize, all of that. It does...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.