Closed bkuliha closed 2 years ago
Thanks for reporting and for the demo.
Unfortunately this is not easy to fix.
FlatLaf painting depends a lot on class Graphics2D
and there are many places where Graphics
is simply cast to Graphics2D
.
I wonder what's the use case for printing Swing UI ?
I do not really have a use case for you. I work at Webswing and we use FlatLaF in our demo application to showcase different components and use cases that we support. Component printing is part of one of our demos, so that is how we identified the issue. Right now we do not have any direct complaints from our customers about this issue. So we do not really see this as a priority. But at least we have this issue here to prove that it is a known issue and we can reference it if needed. So I'd say it is up to you guys if you want to deal with the issue or not. Thanks
When using FlatLaf LaF, the attached code fails on
ClassCastException
. When using default LaF the code works fine.Tested with lastest version 2.0-rc1.
PrintingDemo.java.txt