Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #9908

Re: How to align swing buttons vertically ?

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!usenet.ukfsn.org!not-for-mail
From Martin Gregorie <martin@address-in-sig.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: How to align swing buttons vertically ?
Date Sun, 13 Nov 2011 14:38:42 +0000 (UTC)
Organization UK Free Software Network
Lines 21
Message-ID <j9okpi$va3$1@localhost.localdomain> (permalink)
References <4ebf9c51$0$5055$ba620e4c@news.skynet.be> <j9oef0$ti8$2@localhost.localdomain> <4ebfc473$0$5044$ba620e4c@news.skynet.be>
NNTP-Posting-Host 84.45.235.129
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 8bit
X-Trace localhost.localdomain 1321195122 32067 84.45.235.129 (13 Nov 2011 14:38:42 GMT)
X-Complaints-To usenet@localhost.localdomain
NNTP-Posting-Date Sun, 13 Nov 2011 14:38:42 +0000 (UTC)
User-Agent Pan/0.135 (Tomorrow I'll Wake Up and Scald Myself with Tea; GIT 30dc37b master)
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:9908

Show key headers only | View raw


On Sun, 13 Nov 2011 14:21:55 +0100, Olivier Scalbert wrote:

> On 11/13/2011 01:50 PM, Martin Gregorie wrote:
>> Use a BoxLayout specifying the axis as Y-AXIS.
>>  
>>  
> Thanks !
> But with the BoxLayout they are aligned but they have not the same size!
>
That's nothing to do with the layout. It aligns the objects you're laying 
out by doing its best with the sizes of the objects you created.

JButton inherits size setting methods (setMaximumSize, setMinimumSize, 
setPreferredSize) from JComponent. Use them to control button size.



-- 
martin@   | Martin Gregorie
gregorie. | Essex, UK
org       |

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

How to align swing buttons vertically ? Olivier Scalbert <olivier.scalbert@algosyn.com> - 2011-11-13 11:30 +0100
  Re: How to align swing buttons vertically ? Martin Gregorie <martin@address-in-sig.invalid> - 2011-11-13 12:50 +0000
    Re: How to align swing buttons vertically ? Olivier Scalbert <olivier.scalbert@algosyn.com> - 2011-11-13 14:21 +0100
      Re: How to align swing buttons vertically ? Martin Gregorie <martin@address-in-sig.invalid> - 2011-11-13 14:38 +0000
        Re: How to align swing buttons vertically ? Olivier Scalbert <olivier.scalbert@algosyn.com> - 2011-11-13 18:28 +0100
          Re: How to align swing buttons vertically ? Knute Johnson <nospam@knutejohnson.com> - 2011-11-13 11:01 -0800
            Re: How to align swing buttons vertically ? Olivier Scalbert <olivier.scalbert@algosyn.com> - 2011-11-13 21:17 +0100
              Re: How to align swing buttons vertically ? Knute Johnson <nospam@knutejohnson.com> - 2011-11-13 16:16 -0800
          Re: How to align swing buttons vertically ? Martin Gregorie <martin@address-in-sig.invalid> - 2011-11-13 19:17 +0000
            Re: How to align swing buttons vertically ? Olivier Scalbert <olivier.scalbert@algosyn.com> - 2011-11-13 21:01 +0100
              Re: How to align swing buttons vertically ? "John B. Matthews" <nospam@nospam.invalid> - 2011-11-13 17:33 -0500
          Re: How to align swing buttons vertically ? Lew <lewbloch@gmail.com> - 2011-11-13 11:03 -0800
            Re: How to align swing buttons vertically ? Knute Johnson <nospam@knutejohnson.com> - 2011-11-13 16:28 -0800
  Re: How to align swing buttons vertically ? Roedy Green <see_website@mindprod.com.invalid> - 2011-11-13 09:27 -0800

csiph-web