Forum Stats

  • 3,817,474 Users
  • 2,259,340 Discussions


JFrame size incorrect on MSPaint

sudeep_hs Member Posts: 8
edited Nov 15, 2017 8:22AM in Swing


  I created a jframe in an app by setting the size to 400, 800. I launch and take the printscreen [screenshot]. And i transfer it to the Win10 MSPaint. When the rulers and the grids are switched on in the paint app, the sizes does not match with the launched java window.

The screen resoultion is 1920/1080.

Why is this difference found ? Any help appreciated.

    If you take a png image and transfer the same like above, then the paint app shows the correct size.


  • TPD-Opitz
    TPD-Opitz Member Posts: 2,465 Silver Trophy
    edited Nov 15, 2017 8:22AM

    The reason is that windows10 draws thinner frame borders then older windows versions (at least as win7). But Java gives you the same size of the "drawable area" inside the frame on all systems.



This discussion has been closed.