views:

883

answers:

3

Does someone know an open source project or code snippets, which demonstrate how to create a google-chrome like interface with similar tabs and toolbar in Swing?

I know, that I can use JTabbedPane, but I'm thinking of an interface which looks and feels very similar to the google chrome "tabbed browsing".

A: 

I think you should opt to Substance LAF and make a Chrome-lookalike skin for it (Substance is a skinnable LAF which sort of extends Swing's functionality on the graphical side) and use that, won't be the easiest way to do it but if you have the time and willpower, you'll get exactly what you want.

Esko
+2  A: 

You can probably pull it off with an undecorated JFrame (setUndecorated(true)) to get rid of the title bar.

You'd then create a layout with a tabbed pane filling the window and then overlay the min/max/close buttons on the top right.

If tabbed pane is too inflexible, you will need to put a button bar across the top, with toggle buttons controlling multiple content panels, and do the tab look yourself; as each button becomes active it hides the current panel and unhides the panel that belongs to it.

Software Monkey
A: 

Look at this question (and its answers) too: JTabbedPane: Components before and after the tabs themselves.

stolsvik