This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds and have James Denton on-line!
See this thread for details.
Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization 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 ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Split windows in panels  RSS feed

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

Take a look at the attachment. See how beautiful the window is split into several panels?
How do I do that in Java? Do I get beautiful panels like this using JSplitPane?
panels.jpg
[Thumbnail for panels.jpg]
 
Rancher
Posts: 2814
96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could use a JSplitPane, but that deals only with two components. So, to achieve the effect shown, you need to split those components into one or more components themselves. But you don't need per se a JSplitPane, you can set a decent LayoutManager that can handle more then just one other panel. FlowLayout, GridLayout, BorderLayout, et cetera. So do have a look at the Oracle tutorial about LayoutManagers:
layout managers
 
Rancher
Posts: 2940
19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Do I get beautiful panels like this using JSplitPane?



Try it!

If it does what you want, great. If not then you ask a more detailed question stating what you like or don't like about using a split pane.
 
Bartender
Posts: 620
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you should be aware that Eclipse uses a much more complex way of creating split windows than simply using JSplitPanes. This is usually called docking panes.
There are several resources available, such as here or this previous post.

However, this can get rather complex and is not recommended for the beginner.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!