Jump to content
  • Advertisement
Sign in to follow this  
Halsafar

[java] Align Components in JFrame

This topic is 4691 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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!