I have a text area, which extends KeyAAdapater.
so each time a character is released a KeyEvent is sent to my KeyHandler class.
What I want to do is detect when the user has deleted (by backspace or del) all th text in the text area.
at the moment I have this:
-----------------code-------------------------------
if (textArea.getText().length() == 0)
{
label.setText("No text in textArea"
}
-----------------------------------------------------
However when the user does delete all text in text1, nothing happens...
Does anyone know why this may be, and what i can do to get it to work???
Any and all suggestions are very welcome!
Thanks,
Oxy
we are all of us living in the gutter.
But some of us are looking at the stars.
so each time a character is released a KeyEvent is sent to my KeyHandler class.
What I want to do is detect when the user has deleted (by backspace or del) all th text in the text area.
at the moment I have this:
-----------------code-------------------------------
if (textArea.getText().length() == 0)
{
label.setText("No text in textArea"
}
-----------------------------------------------------
However when the user does delete all text in text1, nothing happens...
Does anyone know why this may be, and what i can do to get it to work???
Any and all suggestions are very welcome!
Thanks,
Oxy
we are all of us living in the gutter.
But some of us are looking at the stars.