• Post Reply Bookmark Topic Watch Topic
  • New Topic

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]
 
Master Rancher
Posts: 2712
92
  • 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: 2914
18
  • 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: 617
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.
 
What kind of corn soldier are you? And don't say "kernel" - that's only for this tiny ad:
Why should you try IntelliJ IDEA ?
https://coderanch.com/wiki/696337/IntelliJ-IDEA
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!