🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #10237

Re: jTextField: String justification problem

#10237
From: Redding Bacon
Date: Mon, 01 Nov 1999 00:00
56 lines
2113 bytes
Anthony,
Thanks man,  judging from a quick verification test, it looks like it works!
So much more simple than I realized!  Thanks alot!

Redding


enisoc <enisoc@hotpop.com> wrote in message
news:7vktn9$70d16@forums.borland.com...
> the javax.swing.JTextComponent setCaretPosition(int) works for me, just
set
> it to 0.
>
> hope this helps,
> Anthony
>
> Redding Bacon <reddingbacon@msn.com> wrote in message
> news:7vi8ut$eos7@forums.borland.com...
> > 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
> >
> >
>
>
Technical Details
Message-ID: <7vkvvh$70d20@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <7vi8ut$eos7@forums.borland.com> <7vktn9$70d16@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: "Redding Bacon" <reddingbacon@msn.com>
Subject: Re: jTextField:  String justification problem
Date: 1999/11/01
Message-ID: <7vkvvh$70d20@forums.borland.com>
X-Deja-AN: 543239038
References: <7vi8ut$eos7@forums.borland.com> <7vktn9$70d16@forums.borland.com>
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
Organization: RMS
X-MSMail-Priority: Normal
Newsgroups: borland.public.jbuilder.java.swing