Scaling of java programs on 4K screen

Answered

Hi there!

I've recently started using IntelliJ for my programming course and it works almost perfectly for me! I do however have one really annoying Problem with scaling. 
I'm using a 13inch XPS 13 with a 4K screen. The editor itself scales quite nicely without me having to change any settings. When I run java programs from within the IDE on the other hand the scaling is a bit weird.

For example a 400x400 Window occupies the whole screen, but if I increase the size to 3000x3000 it is excactly the same size on the screen when I run it. Plus the program isn't even square its more like 1.8:1.

How can I "fix" this? I'm assuming this isn't actually a bug but rather a feature that I don't really understand. I would however like to be able to decide on my own how big my windows are and be able to see the whole thing. I'm really new at java but in Eclipse I don't have this problem...

 

Thanks for you help!

0
1 comment

Try using Java 9, Java 8 has poor support for HiDPI and IntelliJ IDEA uses various hacks and workarounds to support it.

This questions is not specific to the IDE, so http://stackoverflow.com/ would be probably a better place to ask.

0

Please sign in to leave a comment.