This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Swing textfield contents appears in reverse order  RSS feed

 
Amit Chandigarihan
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

We are using Swing UI for our project.
Sometimes we observe a peculiar behavior in our application.
Sometimes if we type any characters in any textbox, it comes in reverse order.
eg, if we type abc, it types a , then b before a and c before ba.
So finally, it ends up in wrong inputs in the screen. It generally happens when the screen is left idle for a long time.
below is a method used in our code.


This method is in an innerclass which is extending PlainDocument.java class.

Can you please let me know if anyone had come across this problem before and possible solutions?

Thanks in advance
 
Shannon Carey
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know it's a bit late, but I have experienced this problem after my application has thrown an exception. After the exception, all text fields have the same problem (text appearing in reverse order). Also, I experienced some rendering bugginess. The solution was to fix the exception.

The other possibility is the localization settings with directionality of text, ie. settings having to do with ComponentOrientation.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!