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


Groups > comp.lang.java.gui > #1430

Re: Limit size of JOption

From "oddstray" <oddstray@THRWHITE.remove-dii-this>
Subject Re: Limit size of JOption
Message-ID <1176235718.667388.142030@h3g2000cwc.googlegroups.com> (permalink)
Newsgroups comp.lang.java.gui
References <vvRSh.154$633.40@newsfe4-gui.ntli.net>
Date 2011-04-27 15:33 +0000
Organization TDS.net

Show all headers | View raw


  To: comp.lang.java.gui
On Apr 10, 12:24 pm, "visionset" <s...@ntlworld.com> wrote:
> <oddst...@gmail.com> wrote in message
>
> > [edited] the height of my JOptionPane, but for the life of me I can't find the
> > magic combination of layouts and set<something>Size calls that works!
>
> JScrollPane sp = ...
> sp.setPrefrerredSize(new Dimension(sp.getPreferredSize().width, myHeight);
>
> Just take the default FlowLayout of JPanel this will respect PreferredSize.

Thanks!  That worked.

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

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


Thread

Limit size of JOptionPane "oddstray" <oddstray@THRWHITE.remove-dii-this> - 2011-04-27 15:33 +0000
  Re: Limit size of JOption "visionset" <visionset@THRWHITE.remove-dii-this> - 2011-04-27 15:33 +0000
    Re: Limit size of JOption "oddstray" <oddstray@THRWHITE.remove-dii-this> - 2011-04-27 15:33 +0000
      Re: Limit size of JOption "Knute Johnson" <knute.johnson@THRWHITE.remove-dii-this> - 2011-04-27 15:33 +0000

csiph-web