[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-2d-dev
Subject:    Re: RFR: 6852577: Only for Nimbus LAF UIManager.get("PasswordField.echoChar") is null [v3]
From:       Alexey Ivanov <aivanov () openjdk ! org>
Date:       2022-09-28 9:17:24
Message-ID: WSWVjw6zUpBekhPt-pwEuq2K0KAffsabNw7RXaAZ8mg=.be3df442-05fd-4d42-a7f2-de5d8413a49a () github ! com
[Download RAW message or body]

On Wed, 28 Sep 2022 09:08:04 GMT, Prasanta Sadhukhan <psadhukhan@openjdk.org> wrote:

> > > You should probably call `setLookAndFeel` on the main thread, or you should \
> > > call `UIManager.get` below on the EDT as well.
> > 
> > In fact, I was inclined to use the main thread, it produces a shorter stack \
> > trace. EDT is okay, no change is required if you don't feel like it.
> 
> Normally, many tests does this only which is what I did initially..
> 
> public static void main(String[] args) throws Exception {
> for (UIManager.LookAndFeelInfo laf : UIManager.getInstalledLookAndFeels()) {
> System.out.println("Testing l&f : " + laf.getClassName());
> SwingUtilities.invokeAndWait(() -> setLookAndFeel(laf));
> 
> 
> but I guess the present one will suffice too...

My initial concern was that you use two different threads where you shouldn't. I \
would rather use the main thread for all operations in this particular case. As long \
as setting the LaF and reading the properties are on the same thread, we're safe.

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

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic