Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #1294
| From | "Daniel Pitts" <daniel.pitts@THRWHITE.remove-dii-this> |
|---|---|
| Subject | Re: GridBagLayout and cha |
| Message-ID | <1174873607.959458.240520@l77g2000hsb.googlegroups.com> (permalink) |
| Newsgroups | comp.lang.java.gui |
| References | <1174868059.450411.39590@o5g2000hsb.googlegroups.com> |
| Date | 2011-04-27 15:32 +0000 |
| Organization | TDS.net |
To: comp.lang.java.gui
On Mar 25, 5:14 pm, "SadRed" <cardinal_r...@yahoo.co.jp> wrote:
> On Mar 26, 7:07 am, "Daniel Pitts" <googlegrou...@coloraura.com>
> wrote:
>
> > Say I have the following code:
>
> > JPanel myPanel = new JPanel(new GridBagLayout());
> > GridBagConstraints constaints = getConstraints();
> > myPanel.add(new JLabel("Hello world"), constaints);
>
> > And then later (as a result of an Event), I do something like
> > constraints.gridx = 3;
> > myPanel.revalidate();
>
> > Will this have the expected effect, or do I need to remove the old
> > label, and re-add it with the new constraints?
>
> You could try it yourself.
I could, but that might have only proved that sometimes it works. I
was asking if it would always work... As I discovered, it won't ever
work, but there is a different way to do it that will always work.
---
* 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 | Next — Previous in thread | Next in thread | Find similar | Unroll thread
GridBagLayout and changin "Daniel Pitts" <daniel.pitts@THRWHITE.remove-dii-this> - 2011-04-27 15:32 +0000
Re: GridBagLayout and cha "Chris Smith" <chris.smith@THRWHITE.remove-dii-this> - 2011-04-27 15:32 +0000
Re: GridBagLayout and cha "Knute Johnson" <knute.johnson@THRWHITE.remove-dii-this> - 2011-04-27 15:32 +0000
Re: GridBagLayout and cha "Tom Hawtin" <tom.hawtin@THRWHITE.remove-dii-this> - 2011-04-27 15:32 +0000
Re: GridBagLayout and cha "Daniel Pitts" <daniel.pitts@THRWHITE.remove-dii-this> - 2011-04-27 15:32 +0000
Re: GridBagLayout and cha "SadRed" <sadred@THRWHITE.remove-dii-this> - 2011-04-27 15:32 +0000
Re: GridBagLayout and cha "Daniel Pitts" <daniel.pitts@THRWHITE.remove-dii-this> - 2011-04-27 15:32 +0000
Re: GridBagLayout and cha "SadRed" <sadred@THRWHITE.remove-dii-this> - 2011-04-27 15:32 +0000
Re: GridBagLayout and cha "Brandon McCombs" <brandon.mccombs@THRWHITE.remove-dii-this> - 2011-04-27 15:32 +0000
Re: GridBagLayout and cha "Daniel Pitts" <daniel.pitts@THRWHITE.remove-dii-this> - 2011-04-27 15:32 +0000
Re: GridBagLayout and cha "Ian Wilson" <ian.wilson@THRWHITE.remove-dii-this> - 2011-04-27 15:32 +0000
Re: GridBagLayout and cha "Daniel Pitts" <daniel.pitts@THRWHITE.remove-dii-this> - 2011-04-27 15:32 +0000
Re: GridBagLayout and cha "Larry Barowski" <larry.barowski@THRWHITE.remove-dii-this> - 2011-04-27 15:32 +0000
Re: GridBagLayout and cha "Larry Barowski" <larry.barowski@THRWHITE.remove-dii-this> - 2011-04-27 15:32 +0000
csiph-web