AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Text-Componente with fixed width but variable height

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Language Programming
View previous topic :: View next topic  
Author Message
N. Hamacher
Guest





PostPosted: Thu Apr 29, 2004 11:40 am    Post subject: Text-Componente with fixed width but variable height Reply with quote



Hi,

i've got an panel with an information section on the left side. This
section is realized as a panel with boxlayout. This panel contains a
text compnonent where i want to put some informations in. The problem
is, that the informations strings have different length so the size of
the text-component has to fit the text. the width has to be fixed (the
whole information sections has a defined width, so the text component).
So just the height can be variated. But i'm just able to set both width
and height so i need a possibility to set just the width!

Maybe someone has a great idea!!

Thanx,

Nico



Back to top
Tony Morris
Guest





PostPosted: Thu Apr 29, 2004 11:43 am    Post subject: Re: Text-Componente with fixed width but variable height Reply with quote



"N. Hamacher" <hamacher_ (AT) _techinfo (DOT) rwth-aachen.de> wrote

Quote:
Hi,

i've got an panel with an information section on the left side. This
section is realized as a panel with boxlayout. This panel contains a
text compnonent where i want to put some informations in. The problem
is, that the informations strings have different length so the size of
the text-component has to fit the text. the width has to be fixed (the
whole information sections has a defined width, so the text component).
So just the height can be variated. But i'm just able to set both width
and height so i need a possibility to set just the width!

Maybe someone has a great idea!!

Here is a brilliant idea: "Use a LayoutManager"
http://java.sun.com/docs/books/tutorial/uiswing/layout/using.html

There are also many articles available that demonstrate why your approach
(failing to use a LayoutManager) is severely flawed.

--
Tony Morris
(BInfTech, Cert 3 I.T., SCJP[1.4], SCJD)
Software Engineer
IBM Australia - Tivoli Security Software
(2003 VTR1000F)



Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Language Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.