sdedic commented on a change in pull request #3414:
URL: https://github.com/apache/netbeans/pull/3414#discussion_r780815461
##########
File path: platform/openide.util.ui/src/org/openide/util/ImageUtilities.java
##########
@@ -118,17 +125,26 @@
* {@code Image}. See comment in {@link #icon2ToolTipImage(Icon, URL)}.
*/
private static volatile Component dummyIconComponent;
+
+ /**
+ * 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 dummyIconComponent2;
static {
/* Could have used Mutex.EVENT.writeAccess here, but it doesn't seem
to be available during
testing. */
if (EventQueue.isDispatchThread()) {
dummyIconComponent = new JLabel();
+ dummyIconComponent2 = new JButton();
Review comment:
Fixed in 30d43a7
--
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