Jump to content
  • Advertisement
Sign in to follow this  
fantasyme

[java] borderlayout ?question

This topic is 3170 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

I am new to java. Now, I use borderlayout command to set my objects layout. However, as I searched on internet + read in the book. North, South, East, West and Center are alinment that I can set? only? I have around 10~ objects. Is it possible to use borderlayout for my project? If I use borderlayout(CENTER) for 2 objects, I found that 2 objects are overlapped. Do you have any suggestion?

Share this post


Link to post
Share on other sites
Advertisement
Quote:
North, South, East, West and Center are alinment that I can set? only?

That's correct.

If you want to add multiple objects to each alignment, first add them to another container, then add this container into the BorderLayout.

Share this post


Link to post
Share on other sites
There are many different layout managers available in swing. If border layout isn't flexible enough for your application, you might want to look into using a different one.

The java/sun swing tutorial covers this topic:

Layout managers

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!