• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how can consume Paste content in the JTextField

 
Dingcheng lee
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 175
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try this code
JTextField textField = new JTextField()
{
public void paste()
{
return;
}
};
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic