After doing a little more digging, I found a Blog entry that describes how to 
implement a custom TabbedComponentFactory. 
https://blogs.oracle.com/geertjan/plug-a-custom-basictabbedpaneui-into-the-netbeans-platform

However, the links to the sources are broken 
http://www.jroller.com/DhilshukReddy/entry/custom_jtabbedpane Would anyone have 
a copy or a link to them?

I also found a YouTube video of Geertjan showing how to set it up. A large 
section of code was just pasted though, so having the source for this example 
would be very helpful. I did find some source for a similar named JGoodies 
implementation. It may be the missing piece ? 
https://jar-download.com/explore-java-source-code-detail.php?file=./javaSource/com.jgoodies/jgoodies-looks/2.7.0/com/jgoodies/looks/plastic/PlasticTabbedPaneUI.java&key=fdbff8687fce223e862172363d7ac040



Stephen Cumminger

From: stephen cumminger <stephen.cummin...@sonideft.com>
Sent: Thursday, July 19, 2018 10:16 AM
To: users@netbeans.apache.org
Subject: Customizing the tab showing a TopComponent in Editor mode

I'd like to change the appearance of the tab used to show a TopComponent in the 
Editor mode. I have been trying to use basic HTML markup to change the color of 
the text displayed by over-riding this method of the TopComponent:

@Override
    public String getHtmlDisplayName()
    {
      String prefix=(isModified())?"*":"";
      String toreturn= "<HTML><B>"+prefix+"<FONT 
COLOR=RED>"+super.getDisplayName()+"</FONT></B></HTML>";
      return toreturn;
    }

The only HTML feature that seems to work is the "bold" indicator. I assumed 
that the tab would support HTML similar to JLabel, but that doesn't appear to 
be the case.

Has anyone been sucessful modifying the tab in some way? My TopComponent is a 
non-singleton, so I will have multiple windows of this type populated with 
different data that I'd like users to be able to distinguish easily. There are 
also singleton TopComponents in my application that listen for the active 
window. I was hoping to make the active relationship obvious using a color 
scheme in the tab area, as that is often the only portion visible. Ideally I'd 
like to be able to change the background color of the whole tab, but I'd settle 
for changing the tab's text color.

Ideas or alternative suggestions always welcome.



Stephen Cumminger


Reply via email to