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.

Bug 201639 - SearchBar and ReplaceBar have a different close button UI to nb's typical close button
Summary: SearchBar and ReplaceBar have a different close button UI to nb's typical clo...
Alias: None
Product: editor
Classification: Unclassified
Component: Search (show other bugs)
Version: 7.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: Milutin Kristofic
Depends on:
Reported: 2011-09-05 14:22 UTC by Milutin Kristofic
Modified: 2011-09-17 14:25 UTC (History)
4 users (show)

See Also:
Exception Reporter:

Close Button API PATCH (25.63 KB, patch)
2011-09-05 14:44 UTC, Milutin Kristofic
Details | Diff
Close Button UI (20.61 KB, image/png)
2011-09-05 14:54 UTC, Milutin Kristofic
Close Button API PATCH 2 (12.47 KB, patch)
2011-09-07 15:28 UTC, Milutin Kristofic
Details | Diff
Close Button API PATCH (38.22 KB, patch)
2011-09-08 07:52 UTC, Milutin Kristofic
Details | Diff
Close Button API PATCH (69.51 KB, patch)
2011-09-09 13:47 UTC, Milutin Kristofic
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Milutin Kristofic 2011-09-05 14:22:42 UTC
Netbeans has a nice close button ui in tabs, where icon changes according to operating system. SearchBar and ReplaceBar and other modules also use their own close buttons, which icon doesn't change. I suggest to unify close button.
Comment 1 Milutin Kristofic 2011-09-05 14:44:54 UTC
Created attachment 110403 [details]
Close Button API PATCH

I am proposing an attached patch. It should unify close buttons in Netbeans

I created simple CloseButtonFactory with two public static methods createCloseButton and createBigCloseButton. They simple create JButton with specific icons for each look and feel.

I just moved close button implementation from CloseButtonTabbedPane to new CloseButtonFactory.
Comment 2 Milutin Kristofic 2011-09-05 14:54:38 UTC
Created attachment 110404 [details]
Close Button UI 

I also attached a screenshot of new Close Button UI in metal look and feel
Comment 3 Jesse Glick 2011-09-07 14:17:03 UTC
By the way do not use the IDE's "Export Diff" when creating patches for review. Ensure that diff.git=1 is configured in ~/.hgrc and use 'hg diff'. See:

Also set <date> in apichanges.xml to the date you actually expect to integrate, typically one week from the day you initiate a review.

<version> and @since should be accompanied by an actual increment in the version in (or if using spec.version.base), and a matching use of the new version in project.xml of the client module (here editor).

The API change entry should also use <class> so as to link to the new Javadoc.

Is there any special button for GTK L&F? OK if not, just curious.
Comment 4 Milutin Kristofic 2011-09-07 15:28:10 UTC
Created attachment 110485 [details]
Close Button API PATCH 2 

Thank you for notes, Jesse. I attached a new hg diff as a patch, changed date to 14 Sept, changed to 7.38, changed api version in editor, added class to apichange.

I also find icons for GTK in Tab Control, so I added them to close button api. They were not in org.openide.awt.
Comment 5 Jesse Glick 2011-09-07 16:38:40 UTC
Note that you are still not using Git-format diffs. Does not matter in this case unless someone wanted to actually try your patch, in which case the binary file adds would not be available, but generally good practice to set this option.

Also the revised patch is missing the new class.
Comment 6 Milutin Kristofic 2011-09-08 07:52:56 UTC
Created attachment 110515 [details]
Close Button API PATCH

Thank you, Mea Culpa. 

I attached Close Button API Patch - it's a git diff with all files.
Comment 7 Jesse Glick 2011-09-08 18:21:23 UTC
[JG01] You may be able to avoid copying all those icons - o.n.swing.tabcontrol has a dependency on openide.awt, so they could just be moved into openide.awt and o.n.swing.tabcontrol could refer to the new resource paths.
Comment 8 Milutin Kristofic 2011-09-09 13:47:33 UTC
Created attachment 110569 [details]
Close Button API PATCH

Alright, I deleted same icons from tabcontrol module and changed path for icons in tabcontrol module. I also increased dependecy on org.openide.awt
Comment 9 Milutin Kristofic 2011-09-14 11:49:11 UTC
I pushed the change in
Comment 10 Quality Engineering 2011-09-17 14:25:12 UTC
Integrated into 'main-golden'
User: Milutin Kristofic <>
Log: #201639 - SearchBar and ReplaceBar have a different close button UI to nb's typical close button