Re: High DPI - Win 10

Steven Yi <[email protected]>
Newsgroups gmane.comp.java.netbeans.modules.openide.devel
Message-ID <CANtcCs40vwYetGWkamyvD1t6XXo6XLXX4F-HBvN0--yyGV+fAQ@mail.gmail.com>
Following up with further information, I haven't seen anything in NB's
sources, but I did do some experimenting with my own code and I found
what looks to the be a cause.  In my program I am using JavaFX and in
one of my module's Installer classes, I have:

      Platform.setImplicitExit(false);
      new JFXPanel();

This is to pre-setup JavaFX before embedding JFX components into the
application.  It's the new JFXPanel() which is implicitly initializing
JavaFX, which in turn seems to reset the DPI awareness of the app.  I
suspect embedding JavaFX into any Swing app may cause this to happen
but have not tested yet.

I did however, find a solution that will work even if
sun.java2d.dpiaware=false is on and JFX is used, which is to use the
manifest trick from:

http://www.danantonielli.com/wp-content/uploads/2014/03/manifest.txt

I think for a stop-gap measure, I will be distributing a manifest in
the app/bin folder for my application and direct users to use the
above trick of modifying the registry.

However, for the future, it seems to me that JFX is being worked on
for high-dpi, but I am unsure if anything is being done for Swing.
Does anyone know the latest?  I have been considering dropping NB's
Swing modules and replacing with JFX-only modules, but it's certainly
not a small decision to make. I'm curious what others have thought
about regarding their own RCP-based apps.

Thanks,
steven


On Wed, Dec 30, 2015 at 5:53 PM, Steven Yi <[email protected]> wrote:
> Hi All,
>
> I recently purchased a Surface Pro 4 that has a High-DPI screen.
> Using NetBeans was awful until setting dpiaware=false (and still not
> great with blurry text...).  That's okay, it's usable. However, for my
> own RCP application, I'm finding that using dpiaware=false in the
> program .conf file does not do the trick.  The splash screen is
> zoomed, but just before the splash screen disappears, it flashes to
> the tiny size and my application opens up with tiny text.
>
> Has anyone encountered this?
>
> I do use a custom look and feel and I'm about to look through the PLAF
> modules' source code to see if any tricks are being done within NB
> itself.  However, if someone has a solution already, I'd love to hear
> it.  If not, I'll post whatever I find out.
>
> Thanks!
> steven
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.