aspose file tools
The moose likes Swing / AWT / SWT and the fly likes Doubt about layouts.. (its simple I think) Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply Bookmark "Doubt about layouts.. (its simple I think)" Watch "Doubt about layouts.. (its simple I think)" New topic
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
    
    3

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Doubt about layouts.. (its simple I think)
 
Similar Threads
doubt
Doubt
Doubt????
JComboBox doubt
Doubt on doubt