I am trying to get paste/copy events in a JTextField when user uses CTRL-V or CTRL-C to paste or copy texts.
The strange thing is, every time I use ctrl-v, ctrl-c, or ctrl-x to paste/copy/cut, there is always a special character (like a small square, or rectangle?) showing up at the end.
I have to use jdk1.4.1 since I am working on a old product. That does not happen in jdk1.5 environment.
I used getText() to get pasted text and then did a trim like this:
String pastedText = getText().trim();
But it seems the length of a pasted text is still the same after trim.
Is this a jdk1.4 bug?
How can I get rid of this unwanted special character?
Thanks,