Results 1 to 2 of 2
- 06-21-2012, 05:24 AM #1Member
- Join Date
- Jun 2012
- Rep Power
Disable drag and drop for any text
Hi people, I'm here with another problem I've just realised ...
I programmed my textfield in order to accept only numbers. It does work great, but if I drag some text from any part and drop it into the textfield,
it accepts it...I was searching on the net and found some helpful information, but just about restricting a textfield to drag something of itself.
I just want to disable dropping any text into the textfield. Hope you understand and could help me...
Thanks in advance...
Re: Disable drag and drop for any text
JFormattedTextField or a DocumentFilter.
Then your field can handle drag and drop or copy and paste, and keypresses.
- By NixasMuraki in forum New To JavaReplies: 2Last Post: 06-07-2011, 02:55 AM
- By NextEpisode1 in forum AWT / SwingReplies: 1Last Post: 02-10-2011, 07:46 PM
- By tomba in forum AWT / SwingReplies: 4Last Post: 12-09-2009, 02:01 PM
- By smartsubroto in forum New To JavaReplies: 4Last Post: 06-23-2008, 08:21 AM
- By Ada in forum AWT / SwingReplies: 3Last Post: 06-07-2007, 06:52 PM