title: How to access Windows 10 scaling value in Java?
body: <p>I'm creating a simple sticky note app in Java, and use the following code to set its font size:</p>
  
  <pre><code>    Font systemDefault = super.getFont();
  
      int style = systemDefault.getStyle();
      int size = systemDefault.getSize();
      String name = "Arial";
  
      noteFont = new Font(name, style, size); 
  </code></pre>
  
  <p>This works perfectly fine for Windows systems with the scaling value set at 100%, but will produce an inadequately small font size if the system scaling value is set at anything higher. (For example, I use a 200% scaling value on my Surface Pro.)</p>
  
  <p>Is there any way that I could access the Windows scaling value from my Java application and use that value to adjust the provided system font size according to scale?</p>