| Author |
Doubt about layouts.. (its simple I think)
|
Vinicius Souza
Ranch Hand
Joined: May 18, 2011
Posts: 45
|
|
My doubt is simple, I dont want to use AbsoluteLayout. So, I putted a Panel inside a frame on the West position using BordeLayout (default). Then I set the frame layout to BoxLayout (YAXIS). So I putted a JLabel and a JTextBox. I wanted it:
Nome:
[___________________________________]
But the JTextBox extended until the border of the panel. How do I fix it?
Thanks!
|
Java is the best (I love C too) heehhh
|
 |
Darryl Burke
Bartender
Joined: May 03, 2008
Posts: 4163
|
|
Insufficient information. To get better help sooner, post a SSCCE (Short, Self Contained, Compilable and Executable) example that demonstrates the problem. That means only the code that constructs, lays out and launches the GUi on the EDT.
Before you do that, try other layouts. BoxLayout respects the maximumSize of a Component, which is probably why you see this behavior.
Have you gone through the layout tutorial?
|
luck, db
There are no new questions, but there may be new answers.
|
 |
 |
|
|
subject: Doubt about layouts.. (its simple I think)
|
|
|