Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #3580 > unrolled thread
| Started by | "jgricourt" <jgricourt@THRWHITE.remove-dii-this> |
|---|---|
| First post | 2011-04-27 15:45 +0000 |
| Last post | 2011-04-27 15:45 +0000 |
| Articles | 4 — 3 participants |
Back to article view | Back to comp.lang.java.gui
Hiding a JTexfield from t "jgricourt" <jgricourt@THRWHITE.remove-dii-this> - 2011-04-27 15:45 +0000
Re: Hiding a JTexfield fr "RedGrittyBrick" <redgrittybrick@THRWHITE.remove-dii-this> - 2011-04-27 15:45 +0000
Re: Hiding a JTexfield fr "Roedy Green" <roedy.green@THRWHITE.remove-dii-this> - 2011-04-27 15:45 +0000
Re: Hiding a JTexfield fr "jgricourt" <jgricourt@THRWHITE.remove-dii-this> - 2011-04-27 15:45 +0000
| From | "jgricourt" <jgricourt@THRWHITE.remove-dii-this> |
|---|---|
| Date | 2011-04-27 15:45 +0000 |
| Subject | Hiding a JTexfield from t |
| Message-ID | <14a55c5f-3ed2-4cdc-8e84-69ca3ca54f5d@w7g2000hsa.googlegroups.com> |
To: comp.lang.java.gui Hi, I'd like to hide a JTextField from the GUI so that the layout doesn't "see it" anymore ? I tried, setVisible(false) but it leaves an empty space on the layout as if the component was still there. Is there an easy way to achieve this ? JGG --- * 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
[toc] | [next] | [standalone]
| From | "RedGrittyBrick" <redgrittybrick@THRWHITE.remove-dii-this> |
|---|---|
| Date | 2011-04-27 15:45 +0000 |
| Subject | Re: Hiding a JTexfield fr |
| Message-ID | <483e6a0a$0$10644$fa0fcedb@news.zen.co.uk> |
| In reply to | #3580 |
To: comp.lang.java.gui jgricourt@free.fr wrote: > Hi, > > I'd like to hide a JTextField from the GUI so that the layout doesn't > "see it" anymore ? I tried, setVisible(false) but it leaves an empty > space on the layout as if the component was still there. > > Is there an easy way to achieve this ? Use a different layout manager. Some layout managers will collapse invisible components. Have you tried resetting the components minimum,maximum,preferred sizes? Have you called the container's pack()? Which layout manager are you using? Have you read http://sscce.org/ ? -- RGB --- * 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
[toc] | [prev] | [next] | [standalone]
| From | "Roedy Green" <roedy.green@THRWHITE.remove-dii-this> |
|---|---|
| Date | 2011-04-27 15:45 +0000 |
| Subject | Re: Hiding a JTexfield fr |
| Message-ID | <br02445v5lll36vjbpfvqd9br2hps7olid@4ax.com> |
| In reply to | #3580 |
To: comp.lang.java.gui On Thu, 29 May 2008 01:25:38 -0700 (PDT), jgricourt@free.fr wrote, quoted or indirectly quoted someone who said : >I'd like to hide a JTextField from the GUI so that the layout doesn't >"see it" anymore ? I tried, setVisible(false) but it leaves an empty >space on the layout as if the component was still there. see http://mindprod.com/jgloss/setvisible.html -- Roedy Green Canadian Mind Products The Java Glossary http://mindprod.com --- * 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
[toc] | [prev] | [next] | [standalone]
| From | "jgricourt" <jgricourt@THRWHITE.remove-dii-this> |
|---|---|
| Date | 2011-04-27 15:45 +0000 |
| Subject | Re: Hiding a JTexfield fr |
| Message-ID | <e321307d-9ad6-4da2-bd3b-a9e0cb089ac3@z72g2000hsb.googlegroups.com> |
| In reply to | #3586 |
To: comp.lang.java.gui Yes, this describes exactly what happen with my layout manager. TablLayout goes for the first solution by default but let the programmer choose to go for the second one. -- quote How are invisible elements treated? 1. Do they act as if they weren=92t there at all? Do the other elements move in to take over the vacated space? Is the visual effect the same as removing them from the enclosing Container? 2. Is there just a blank hole marking their place? It depends on the LayoutManager you choose. LayoutManagers are free to choose either strategy. --- * 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
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.java.gui
csiph-web