-
JTextField
Hi, I'm having major trouble positioning two fields a JTextField & JPasswordField
for a login dialog box that I'm trying to create. Is it just me or would
this Swing story seem quite annoyingly intricate, Boxes and frames and panels
and....YUCK!!!
Any help would be appreciated
tia,
ed
-
Re: JTextField
Hello Ed:
Use setBounds(int,int,int,int) to position either component anywhere you
want. I always try to add the component to the container first, then call
setBounds() and pass in x,y,width,height (can't remember specific order off
the top of my head - sorry).
HTH,
Tom
"ed" <edejongh@businesseurope.com> wrote:
>
>Hi, I'm having major trouble positioning two fields a JTextField & JPasswordField
>for a login dialog box that I'm trying to create. Is it just me or would
>this Swing story seem quite annoyingly intricate, Boxes and frames and panels
>and....YUCK!!!
>
>Any help would be appreciated
>
>tia,
>
>ed
-
Re: JTextField
if you find Swing "annoyingly intricate", then i believe you're doing something
really wrong. Are you using any graphical IDE? if not, better get one. And
have you even heard of a Layout Manager? If you want to line those fields
up, throw them in a JPanel with GridLayout!
>"ed" <edejongh@businesseurope.com> wrote:
>>
>>Hi, I'm having major trouble positioning two fields a JTextField & JPasswordField
>>for a login dialog box that I'm trying to create. Is it just me or would
>>this Swing story seem quite annoyingly intricate, Boxes and frames and
panels
>>and....YUCK!!!
>>
>>Any help would be appreciated
>>
>>tia,
>>
>>ed
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks