Article View: borland.public.jbuilder.java.swing
Article #10232Re: jTextField: String justification problem
From: Rich Wilkman
Date: Mon, 01 Nov 1999 00:00
Date: Mon, 01 Nov 1999 00:00
48 lines
2255 bytes
2255 bytes
Redding: This is the same behaviour as awt.TextField, etc. One gets the feeling that this is how Javasoft thinks it should work. Can you set the cursor position to 0? -Rich Redding Bacon wrote: > > Hey all, > > I am using JB3 to create Java2 applets and I am using all swing components. > Each applet has several JTextComponents that it uses to display text. The > text that is displayed is sometimes longer than the TextComponent used to > display it. When this happens you can only see the end of the string in the > text field. For example, say that I have the following JTextField and set > its text: > > JTextField jt = new JTextField(); > jt.setSize(20, 20); /* really short text field > */ > String string = "This is a test string for the test JTextField"; > jt.setText(string); > > In this example, when I run the applet the jt text field will display the > string but you will only see the last few characters of it. It would much > better if it could display the first part of the string instead. How can I > do that? I've looked everywhere, but can't figure it out. Anyone have a > sugestion? > > Thanks, > Redding -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Rich Wilkman Quality Assurance Manager Borland JBuilder Team If you see something that looks like an opinion up there, it's mine and mine alone. Mail sent to me from the newsgroups won't bounce but will be ignored. If I have time, I'll respond, but you have a better chance if you confine your posts to the newsgroups =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Technical Details
Message-ID:
<381DD20C.E4C0D212@inprise.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<7vi8ut$eos7@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,439b8cbe49d2cafd X-Google-Attributes: gid111d45,public From: Rich Wilkman <rwilkman@inprise.com> Subject: Re: jTextField: String justification problem Date: 1999/11/01 Message-ID: <381DD20C.E4C0D212@inprise.com> X-Deja-AN: 543166985 Content-Transfer-Encoding: 7bit References: <7vi8ut$eos7@forums.borland.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: Another Netscape Collabra Server User Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.swing