Article View: borland.public.jbuilder.java.swing
Article #1388Re: JButton auto resize??
From: Rudy
Date: Thu, 18 Dec 2003 19:02
Date: Thu, 18 Dec 2003 19:02
42 lines
2505 bytes
2505 bytes
Hi, thanks for the reply, I cannot see how i am using the XYLayout in the code i printed, but all I want to be able to do is allow a button to be sized based on its content. I all wrote setLayout(null) so i thought this would not give me a layout manager??? Thanks Rudy "John McGrath [TeamB]" <ng-b@JPMcGrath.net> wrote in message news:3fe0f730@newsgroups.borland.com... > On 12/17/2003 at 2:41:18 AM, Rudy wrote: > > > > What XYConstraints do you use when you add the button to its > > > container? > > > Here is the code for my class, > > This is the line of code I was trying to get you to look at. You are > using an XYLayout, but you are not specifying an XYConstraint object > when you add it to the container. > > > super.add(mComponent); > > But that said, I really wonder why you are using XYLayout in the first > place. It sounds like you are trying to directly manage the size and > position of the buttons, so what does the layout manager do for you? > > > I also dont suppose you could tell me how best to use the images and > > imageIcons for buttons, > > Take a look at the Java Tutorial on the Sun web site. The Swing > section should cover this. > > -- > Regards, > > John McGrath [TeamB] > > --------------------------------------------------- > Before sending me e-mail, please read: > http://www.JPMcGrath.net/newsgroups/e-mail.html
Technical Details
Message-ID:
<3fe1f9e1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3fca70a4$1@newsgroups.borland.com> <3fcaeb5a@newsgroups.borland.com> <3fde40c0$1@newsgroups.borland.com> <3fde639f$1@newsgroups.borland.com> <3fe008a8@newsgroups.borland.com> <3fe0f730@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,d747d5f574c277f5 X-Google-Attributes: gid111d45,public X-Google-ArrivalTime: 2003-12-18 11:10:42 PST Reply-To: "Rudy" <rhentzen@hotmail.com> From: "Rudy" <rhentzen@hotmail.com> Newsgroups: borland.public.jbuilder.java.swing References: <3fca70a4$1@newsgroups.borland.com> <3fcaeb5a@newsgroups.borland.com> <3fde40c0$1@newsgroups.borland.com> <3fde639f$1@newsgroups.borland.com> <3fe008a8@newsgroups.borland.com> <3fe0f730@newsgroups.borland.com> Subject: Re: JButton auto resize?? Date: Thu, 18 Dec 2003 19:02:50 -0000 Lines: 44 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 81.86.182.21 Message-ID: <3fe1f9e1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1071774177 81.86.182.21 (18 Dec 2003 11:02:57 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail