RFR: JDK-8015739: Background of JInternalFrame is located out of JInternalFrame [v2]

Alexander Zuev kizune at openjdk.org
Tue Sep 20 18:15:48 UTC 2022


On Mon, 19 Sep 2022 20:14:24 GMT, Harshitha Onkar <honkar at openjdk.org> wrote:

> I was also thinking if we can - may be precompute & store all the corner values in a `HashMap` for all the scale values that we can expect?

It depends on how often this value is being computed and how complicated the computation is. Since we request the current transform value anyways on every paint i do not see how accessing the HashMap would be more beneficial than the simple floating point multiplication and a rounding up the result. Just make the static final constant storing the default corner size and a local variable that stores the calculated current corner. You can try to use HashMap but i doubt it will make much difference performance wise. It is not a complex calculation. I might be wrong so you can try both ways and check for the performance impact.

-------------

PR: https://git.openjdk.org/jdk/pull/10274



More information about the client-libs-dev mailing list