Re: Hiding a JTexfield from the GUI
- From: RedGrittyBrick <RedGrittyBrick@xxxxxxxxxxxxx>
- Date: Thu, 29 May 2008 09:32:07 +0100
jgricourt@xxxxxxx 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
.
- References:
- Hiding a JTexfield from the GUI
- From: jgricourt
- Hiding a JTexfield from the GUI
- Prev by Date: Hiding a JTexfield from the GUI
- Next by Date: Re: JFrame resizing
- Previous by thread: Hiding a JTexfield from the GUI
- Next by thread: Re: Hiding a JTexfield from the GUI
- Index(es):
Relevant Pages
|