Create a Visual Studio Type View Using Java Swing

I would like to create a Java Swing application extension to look somewhat similar to an IDE like Eclipse or Visual Studio. That is, there will be a panel on the left, which displays the tree, and a tab bar on the right, which allows you to open and edit several elements of the tree on the right. For this, I could easily use BorderLayout and just use the center and left areas.

However, I would also like the user to be able to drag the border between the two panels, as Eclipse and Visual Studio do. I can come up with several ways to do this, but it was curious if anyone had found a particularly good way to do this or knew an example. Ive googled for this but found nothing.

+4
source share
2 answers

You can use JSplitPane . And maybe check out the article on MultiSplitPane .

+3
source

While JSplitPane does exactly what you requested, you might also be interested in JToolBar, which does other Eclipse-like things like attaching / detaching and dragging a toolbar around the user interface.

+2
source

Source: https://habr.com/ru/post/1307037/


All Articles