my dog learned polymorphism*
The moose likes Swing / AWT / SWT and the fly likes how can consume Paste content in the JTextField Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "how can consume Paste content in the JTextField" Watch "how can consume Paste content in the JTextField" New topic
Author

how can consume Paste content in the JTextField

Dingcheng lee
Greenhorn

Joined: Aug 26, 2002
Posts: 18
i do't want user to paste any content in a JTextField.i want to consume the event in the KeyListener.but do that,i am consume the event ,but the content
appear in the JTextField.who can help?
VIJAY Yadlapati
Ranch Hand

Joined: Aug 04, 2003
Posts: 175
Try this code
JTextField textField = new JTextField()
{
public void paste()
{
return;
}
};
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how can consume Paste content in the JTextField