Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

trouble clearing JTextPane  RSS feed

 
Maksim Kogan
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a JTextPane that needs to be cleared whenever a user hits the enter key. I'm using a nested "InputBoxProcessor" class in my applet and am using the keyPressed method as keyReleased and keyTyped both seem unresponsive. the method clears all the text and sends it to its proper destination, however I still have a trailing newline which stays in the JTextPane. I've tried reading the API docs on how to solve this and still nothing. Below is my code for the method, please help, this is pretty much the last wrinkle I need to iron out.

[ April 02, 2004: Message edited by: Maksim Kogan ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!