Sign in to follow this  

[java] Align Components in JFrame

This topic is 4380 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Is there any nice way to align the objects in my JFrame? Like even something as simple as this JTabbedPane no matter how the window is resized should always be displayed at the far right of the BorderLayout().

Share this post


Link to post
Share on other sites
Okay I posted to quickly on that one.

http://java.sun.com/j2se/1.4.2/docs/api/java/awt/BorderLayout.html

Thats my answer for anyone interested or who makes it here via google one day.

Share this post


Link to post
Share on other sites
Okay that really helps, but how about individual components within components.
Like okay, I got my Tabbed pane at the right like I want, but how do I further align the objects within the tabbed pane with ease?

Share this post


Link to post
Share on other sites
Quote:
Original post by Halsafar
Okay that really helps, but how about individual components within components.
Like okay, I got my Tabbed pane at the right like I want, but how do I further align the objects within the tabbed pane with ease?


You can put panels in panels with various LayoutManagers to achieve the desired results. There is a very good tutorial that can show this effectively.

http://java.sun.com/developer/onlineTraining/GUI/AWTLayoutMgr/shortcourse.html

Share this post


Link to post
Share on other sites

This topic is 4380 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this