Skip to content
This repository has been archived by the owner on Feb 15, 2022. It is now read-only.

IllegalArgumentException in SubstanceImageCreator.getRadioButton #138

Open
enwired opened this issue Apr 1, 2015 · 4 comments
Open

IllegalArgumentException in SubstanceImageCreator.getRadioButton #138

enwired opened this issue Apr 1, 2015 · 4 comments

Comments

@enwired
Copy link

enwired commented Apr 1, 2015

This exception has been observed on one occasion when using Substance LAF in our project.

java.lang.IllegalArgumentException: alpha value out of range
    at java.awt.AlphaComposite.<init>(AlphaComposite.java:618)
    at java.awt.AlphaComposite.getInstance(AlphaComposite.java:683)
    at org.pushingpixels.substance.internal.utils.SubstanceImageCreator.getRadioButton(SubstanceImageCreator.java:880)
    at org.pushingpixels.substance.internal.ui.SubstanceRadioButtonUI.getIcon(SubstanceRadioButtonUI.java:206)
    at org.pushingpixels.substance.internal.ui.SubstanceRadioButtonUI.getDefaultIcon(SubstanceRadioButtonUI.java:311)
    at org.pushingpixels.substance.internal.ui.SubstanceRadioButtonUI.paint(SubstanceRadioButtonUI.java:346)
    at javax.swing.plaf.ComponentUI.update(ComponentUI.java:161)
    at org.pushingpixels.substance.internal.ui.SubstanceRadioButtonUI.__org__pushingpixels__substance__internal__ui__SubstanceRadioButtonUI__update(SubstanceRadioButtonUI.java)
    at org.pushingpixels.substance.internal.ui.SubstanceRadioButtonUI.update(SubstanceRadioButtonUI.java)
    at javax.swing.JComponent.paintComponent(JComponent.java:777)
    at javax.swing.JComponent.paint(JComponent.java:1053)
    at javax.swing.JComponent.paintToOffscreen(JComponent.java:5223)
    at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1572)
    at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1495)
    at javax.swing.RepaintManager.paint(RepaintManager.java:1265)
    at javax.swing.JComponent._paintImmediately(JComponent.java:5171)
@IvanRF
Copy link

IvanRF commented Feb 15, 2016

+1

Regarding your commit, there are more places to check the alpha value on the SubstanceImageCreator class.

@enwired
Copy link
Author

enwired commented Dec 2, 2016

Thanks! The single fix that I did in my fork was enough to eliminate the problem in our project, but you may be correct that this problem can occur in other instances.

@IvanRF
Copy link

IvanRF commented Feb 24, 2017

@enwired do you have an scenario for this same issue on kirill-grouchnikov#18? (in order to find the root cause)

@enwired
Copy link
Author

enwired commented Feb 24, 2017

Unfortunately I do not have any way to reproduce this. It was seen once or twice in our code, but was not easily reproducible. It has never been seen again after I applied the little fix.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants