Enhance JGoodies Looks on JTabbedPane

I’m using for a period JGoodies Looks for displaying a polished face of my applications and I did like the demo of Karsten Lentzsch –Metamorphosis– so I becomed interested in obtaining the same effect of JTabbedPane tab header. The setting
tabbedPane.putClientProperty(Options.EMBEDDED_TABS_KEY, Boolean.TRUE);
helps but is not enough as the result is
A closer look like this

is obtained if you overwrite PlasticTabbedPaneUI method for
protected void paintText(Graphics g, int tabPlacement, Font font, FontMetrics metrics, int tabIndex, String title, Rectangle textRect, boolean isSelected) with using a derived Bold font
and
protected void paintTabBackground(Graphics g, int tabIndex, int x, int y, int w, int h, boolean isSelected) with a GradientPaint on tab’s header width.

Author: Liviu Nastasa

Passionate about software development, sociology, running...definitely a geek.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s