This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Displaying Long String in JTextField..(Urgent) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Displaying Long String in JTextField..(Urgent)" Watch "Displaying Long String in JTextField..(Urgent)" New topic

Displaying Long String in JTextField..(Urgent)

nitin goswami

Joined: Mar 01, 2005
Posts: 25
Hi all,
Whenever I enter long text in JTextField it truncates characters from left and displays the right most characters only. Is there any way to change the order of displaying the text in order from LEFT to RIGHT instead of RIGHT to LEFT.

Kindly provide your valuable comments !!!
Thanks and regards...
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
are you talking about as you enter text? seems a silly requirement
to have text go 'out-of-sight' on the right, so you can't see what
you've typed.

or is it a paste action you want to have the initial characters shown?
if so, something like this

nitin goswami

Joined: Mar 01, 2005
Posts: 25
Thanks for replying!!!
I was talking about the case when we type a long string in JTextField or when we set text using JTextField.setText("Long String") method....
Only the left most characters get visible.I have a requirment that in such case i want to see the text from the start,it should truncate from the right end.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Displaying Long String in JTextField..(Urgent)
It's not a secret anymore!