Win a copy of Modern JavaScript for the Impatient this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Could someone explain why the BorderLayout Manger is only limited to 5 panels?

Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I'm trying to solve a short answer on why the manager can only handle 5 panels(without including putting panels inside of panels).

I've tried looking at this link but I couldn't find any information as to why it is limited to 5 panels:
Posts: 25798
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's limited to five panels because that's the way it's laid out. One panel in the centre, one at each side, that makes five.
Posts: 4568
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's a remarkably flexible layout manager. Full width components at the top and bottom using their preferred height, full (remaining) height components on either side using their preferred width, and the rest.

You can, of course, define a layout behaviour that has more panels. But that would be a different layout. There's nothing stopping people writing one (and many have), but it doesn't make a BorderLayout less useful.

(The only layout manager I've ever written myself that I actually found useful was an "inverse border layout". A centred component of it's own preferred size, and then components filling the spaces round the edges. it came in handy for interfaces with two lists of the same size with some buttons in the middle for transferring between them).
Well behaved women rarely make history - Eleanor Roosevelt. tiny ad:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic