sdedic commented on a change in pull request #3459:
URL: https://github.com/apache/netbeans/pull/3459#discussion_r785974124
##########
File path: platform/openide.util.ui/src/org/openide/util/ImageUtilities.java
##########
@@ -117,18 +125,27 @@
* {@link Icon#paintIcon(Component, Graphics, int, int)} when converting
an {@code Icon} to an
* {@code Image}. See comment in {@link #icon2ToolTipImage(Icon, URL)}.
*/
- private static volatile Component dummyIconComponent;
+ private static volatile Component dummyIconComponentLabel;
+
+ /**
+ * Second dummy component. Some {@link Icon#paintIcon(java.awt.Component,
java.awt.Graphics, int, int)} are very picky and downcast the
+ * Component to a specific subclass. JCheckBox will satisfy checkboxes,
abstract buttons etc. Will not eliminate all cases, but helps.
+ *
+ */
+ private static volatile Component dummyIconComponentButton;
static {
/* Could have used Mutex.EVENT.writeAccess here, but it doesn't seem
to be available during
testing. */
if (EventQueue.isDispatchThread()) {
- dummyIconComponent = new JLabel();
+ dummyIconComponentLabel = new JLabel();
+ dummyIconComponentButton = new JButton();
Review comment:
Done - fixed & review feedback squashed into the feature commits.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists