On Mon, 15 Jun 2026 11:43:12 GMT, Marius Hanl <[email protected]> wrote:

> Right. I was referring to skins derived from `Skin` directly, since they 
> could be programmed so that `dispose` removes the inner working and `install` 
> reinstalls them. The class that comes closest to this and might work - 
> assuming the logic resides in `install` instead - is JavaFX's 
> `InputFieldSkin`.
> 
> But that has nothing to do with this PR. I was just wondering if it might 
> make sense at some point to allow the reuse of all JavaFX skins, since we 
> already have the necessary architecture in place.

I will say that it seems a bit weird that _you_ create the skin instance, but 
the _control_ disposes it. I think it would have been a better design if:
1. The control creates the skin instance on your behalf, and then disposes it 
if you request another skin, or
2. you create the skin instance, but you are also responsible for disposal.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/2177#discussion_r3413952835

Reply via email to