hard to theme netbeans perfectly
2015-08-06
It is hard to theme netbeans using traditional swing look & feel. The reason is netbean’s tab container is not traditional swing JTabbedPane. See the post https://netbeans.org/bugzilla/show_bug.cgi?id=150393
Netbeans use a AbstractViewTabDisplayerUI to support only few “default look & feel”, such as Metal, Nimbus, Aqua. see below:
The problem is : This default look & feel tab container styles are preset to netbeans source code. So we *DONT* have a way to override it. And each of them just draw things by its own ways (see below), even you look & feel is based on one of them, you CANT override its style.
private void paintBottomBorder(Graphics g, JComponent c) { Color color = isActive() ? getActBgColor() : getInactBgColor(); g.setColor(color); Rectangle bounds = c.getBounds(); g.fillRect(1, bounds.height - 3, bounds.width - 1, 2); g.setColor(getBorderShadow()); g.drawLine(1, bounds.height - 1, bounds.width - 1, bounds.height - 1); }
When i apply peter-swing to netbeans, take a look below, the tab container is ugly (LHS). In right hand side, the tab should look like that.