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


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

Re: Gridbag Layout. Fixin

From "tar" <tar@THRWHITE.remove-dii-this>
Subject Re: Gridbag Layout. Fixin
Message-ID <ymid4wd6phv.fsf@blackcat.isi.edu> (permalink)
Newsgroups comp.lang.java.gui
References <787fcb92a8883@uwe>
Date 2011-04-27 15:39 +0000
Organization TDS.net

Show all headers | View raw


  To: comp.lang.java.gui
"Andrew Thompson" <u32984@uwe> writes:

> Chanchal wrote:
> ..
> >I have JPanel (jPanel1 )on right hand side of a JSplitPane I have
> >applied GridbagLayout to jPanel1 and added two more JPanels (jPanel2
> >and jPanel3) to jPanel1. I need to make  sure that the size jPanel3 is
> >not changed when the divider of the JSplitPane is moved. 
> 
> What do you mean?  If the splitpane is resized, the JPanel3
> will become 'thinner'.  If you won't want that, try *not* putting 
> it in a JSplitPane.

It seems from carefully reading the description that the OP has two
(sub)panels on the right side of the split pane.  What he wants is that
when the split pane resizes, one of the sub-panels retains its original
size and all of the shrinkage comes from the other sub-panel.

I think BorderLayout would work most simply, although I'm sure there's a
way to do with GridBagLayout.  It might also help to make sure that Min,
Max and Preferred size of the static subpanel are all the same.

-- 
Thomas A. Russ,  USC/Information Sciences Institute

---
 * 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

Re: Gridbag Layout. Fixin "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:39 +0000
  Re: Gridbag Layout. Fixin "tar" <tar@THRWHITE.remove-dii-this> - 2011-04-27 15:39 +0000
    Re: Gridbag Layout. Fixin "Chanchal" <chanchal@THRWHITE.remove-dii-this> - 2011-04-27 15:39 +0000
    Re: Gridbag Layout. Fixin "Filip Larsen" <filip.larsen@THRWHITE.remove-dii-this> - 2011-04-27 15:39 +0000

csiph-web