How to create Google Chrome tabs and interface in Java Swing?

Does anyone know an open source project or code snippets that demonstrate how to create a Google Chrome interface with similar tabs and a toolbar in Swing?

I know I can use JTabbedPane , but I think of an interface that looks and feels very much like google chrome "tabbed".

+4
source share
4 answers

I just created my own open source library called Jhrome. Check this!

It is available on github: https://github.com/jedwards1211/Jhrome

The documentation is sparse right now, but it's pretty solid, with the exception of AWT / Swing memory leaks, which I haven't figured out yet. If you are interested in people, I will polish it.

+5
source

You can possibly disable it with unecorated JFrame (setUndecorated (true)) to get rid of the title bar.

Then you will create a layout with a tab filling the window, and then overlay the min / max / close buttons in the upper right corner.

If the tabbed panel is too inflexible, you will need to place the button bar on top, use the buttons to switch multiple content panels and make the tab yourself; as each button becomes active, it hides the current panel and displays the panel that belongs to it.

+3
source

I think you should choose Substance LAF and create a Chrome-lookalike skin for it (Substance is an LAF skin that extends Swing functionality on the graphic side), and it will not be the easiest way to use it, but if you have time and willpower , you get exactly what you want.

0
source

Have a look at this question (and its answers): JTabbedPane: components before and after the tabs themselves .

0
source

All Articles