开发者

Create a Visual Studio type look using Java Swing

I would like to create extend a Java Swing application to have a look somewhat similar to an IDE such as Eclipse or Visual Studio. That’s, there would be a panel at the left that displays a tree, and a tab panel on the right that allows several elements of the tree to be opened and edited on right. For this I could easily use a BorderLayout and just use the center and left areas.

However, I would also like to have the ability for the user to drag the border between these two panels, just like Eclipse and Visual Studio allow. I can think of several ways to do this, but was curious if anyone had found a particular开发者_开发问答ly good way to do this, or knew of an example. I’ve googled for it, but have not found anything.


You could use JSplitPane. And maybe have a look at an article about a MultiSplitPane.


While JSplitPane does exactly what you asked for, you might also be interested in JToolBar, which does other Eclipse-like things such as attach/detach and drag a panel of tools around the UI.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜