The Artima Developer Community
Sponsored Link

Java Answers Forum
an interesting JTextField question - please help!

1 reply on 1 page. Most recent reply: Dec 17, 2004 3:40 AM by mausam

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Fred Brent

Posts: 2
Nickname: zzaazzaazz
Registered: Oct, 2004

an interesting JTextField question - please help! Posted: Oct 31, 2004 10:26 AM
Reply to this message Reply
Advertisement
Hello all,

I have a series of JTextField's that are constructed to a fixed size (20) and are placed on a JDialg. Next, I set the text in each of these text fields to strings that can be virtually any length.

The problem occurs when the text is too long for the space in the text field. Let's say the string is 'startEnd'. I might see [tEnd] when I'd prefer to see[star].

Please help! Thanks.


mausam

Posts: 243
Nickname: mausam
Registered: Sep, 2003

Re: an interesting JTextField question - please help! Posted: Dec 17, 2004 3:40 AM
Reply to this message Reply
use
jTextArea1.setCaretPosition(0); to set the cursor at the start.

Flat View: This topic has 1 reply on 1 page
Topic: changing text color in JTextArea Previous Topic   Next Topic Topic: Decode AIS data(need help)

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use