Geertjan's Blog

  • April 28, 2009

Removing the Three-Sided Border of TopComponents

Geertjan Wielenga
Product Manager
This is a follow up to my blog entry from June 08, 2006, entitled Farewell to Space Consuming Weird Tabs. In the comments, someone appropriately named "Cynic" writes:

Yeah, write about it again when you get rid of that ugly ass three sided border and top separator.

Since Cynic is obviously a person of remarkably refined upbringing, his heart's desire has been uppermost on my mind all these years. This morning someone commented to that blog entry, solving the puzzle in a very simple way. I thought I'd share this insight with Cynic, who must surely be hanging out there somewhere, sipping a sherry while sucking ponderously on his astutely chiseled pipe. Perhaps he's flipping through a thick philosophical treatise at the same time, all the while discussing the mind/body dichotomy with his equally refined offspring.

Here's before:

And here's after:

And here's how:

import javax.swing.BorderFactory;
import javax.swing.UIManager;
import org.netbeans.swing.tabcontrol.plaf.DefaultTabbedContainerUI;
import org.openide.modules.ModuleInstall;
public class Installer extends ModuleInstall {
public void restored() {

The above requires a dependency on the "Tab Control" module.

Much more is possible, as the screenshot below shows, via code completion:

Thanks very much Michael b, for this tip!

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.