This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
<apidef name="awt">AWT API</apidef>
</apidefs>
<changes>
<change id="Hide-close-button-in-CloseButtonTabbedPane">
<api name="awt"/>
<summary>API to hide close button in CloseButtonTabbedPane</summary>
<version major="7" minor="8"/>
<date day="6" month="5" year="2009"/>
<author login="jbecicka"/>
<compatibility addition="yes" binary="compatible" semantic="compatible" deprecation="no" deletion="no" modification="no"/>
<description>
Added possibility to hide close button in CloseButtonTabbedPane
through tab's client property
component.putClientProperty(TabbedPaneFactory.NO_CLOSE_BUTTON, Boolean.TRUE)
</description>
<issue number="164578"/>
</change>
<change id="AlwaysEnabledAction-extra-properties-and-name-sync">
<summary>AlwaysEnabledAction extra properties and Action.NAME synchronization</summary>
javadoc.arch=${basedir}/arch.xml
javadoc.apichanges=${basedir}/apichanges.xml
spec.version.base=7.7.0
spec.version.base=7.8.0
}
private Rectangle getCloseButtonBoundsAt(int i) {
Component c = findTabAt(i);
//if NO_CLOSE_BUTTON -> return null
if (c!=null && c instanceof JComponent) {
Object prop = ((JComponent) c).getClientProperty(TabbedPaneFactory.NO_CLOSE_BUTTON);
if (prop!=null && prop instanceof Boolean && (Boolean) prop) {
return null;
Rectangle b = getBoundsAt(i);
if (b == null)
* when the user clicks close button on a tab.
*/
public static final String PROP_CLOSE = CloseButtonTabbedPane.PROP_CLOSE;
/**
* To hide close button feature on specific tab, put value Boolean.TRUE
* as a client property of your tab:<br>
* <pre>
* component.putClientProperty(TabbedPaneFactory.NO_CLOSE_BUTTON, Boolean.TRUE)
* </pre>
* @since 7.8
public static final String NO_CLOSE_BUTTON = "noCloseButton";
/** Creates a new instance of TabbedPaneFactory */
private TabbedPaneFactory() {
* value is the inner component inside the clicked tab.
*
* @return Special TabbedPane with closeable tabs.
* @see TabbedPaneFactory#NO_CLOSE_BUTTON
public static JTabbedPane createCloseButtonTabbedPane() {
return new CloseButtonTabbedPane();