Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Eric Sosman Newsgroups: comp.lang.java.programmer Subject: Re: How does a scrollbar paint differently? Date: Wed, 30 May 2018 11:09:16 -0400 Organization: A noiseless patient Spider Lines: 23 Message-ID: References: <00f505eb-cb45-4306-a554-bfad87371dd9@googlegroups.com> <7f435fa4-c7c0-4899-a757-f900eaae07f8@googlegroups.com> <21dc0f98-f0b2-44fd-967c-e98563fcbb15@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Wed, 30 May 2018 15:09:18 -0000 (UTC) Injection-Info: h2725194.stratoserver.net; posting-host="ed96e3f99fcd8593c73420a03ff58067"; logging-data="32211"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/aCdO+b9GqnzxjTWARCt9Z" User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 Cancel-Lock: sha1:kpe1ZB0Nbdu+hIOwISh6KoWyao8= In-Reply-To: <21dc0f98-f0b2-44fd-967c-e98563fcbb15@googlegroups.com> Content-Language: en-US Xref: csiph.com comp.lang.java.programmer:38295 On 5/30/2018 10:37 AM, Eric Douglas wrote: > On Tuesday, May 29, 2018 at 5:17:35 PM UTC-4, Eric Sosman wrote: >> The first scrollbar sounds like the one belonging to the Java cross- >> platform "Metal" look and feel, javax.swing.plaf.metal.MetalLookAndFeel. >> The other sounds like com.sun.java.swing.plaf.windows.WindowsLookAndFeel >> (or possibly com.sun.java.swing.plaf.windows.WindowsClassicLookAndFeel). >> Are you *sure* both getLookAndFeel() calls return the latter? Or, are >> you *sure* that there's no setLookAndFeel() call after getLookAndFeel()? >> > > I definitely only call setLookAndFeel once, where I am assigning the WindowsLookAndFeel. I just tried creating a raw test program with all Oracle classes, and javax.swing.plaf.metal.MetalLookAndFeel is the default LookAndFeel, and when I assign the WindowsLookAndFeel it looks right. So now I have to see what my custom classes are doing differently that I was definitely calling the set for the WindowsLookAndFeel but somehow it displayed the scrollbar as MetalLookAndFeel. > Your original post mentioned that "a 3rd party API is handling the window," and perhaps that's where some look-and-feel shenanigans occur. I don't know whether you can change (or even inspect) the internals of the third-party code, but perhaps you could get a few clues by calling UIManager.getLookAndFeel() more than once -- like, say, before building any of your UI, and again after the UI appears on-screen. -- esosman@comcast-dot-net.invalid Nine hundred sixty-six days to go.