How to use jmeter ui on ultra high resolution display

user3911406 picture user3911406 · Aug 5, 2014 · Viewed 9.1k times · Source

The jmeter UI on windows 8 with a 3200X1800 Lenovo Laptop is unusable. Fonts on the far left pane are toooo small and on the right side the line spacing is too small for the fonts. If I change my resolution to 1920X1080, it has no effect. tried using on second monitor that is 1920X1080. No Luck. System is set for larges sizes. Can't seem to swap which monitor is primary either. Anyone solve this?

Answer

Peter Kovac picture Peter Kovac · Dec 16, 2015

Edit as of August 2017 for version 3.2:

The answer below might be more up to date and simple

I stumbled upon answer about setting Swing font at runtime and it gave me a clue how to set JMeter's fonts.

According to Swing's DefaultMetalTheme.java source, this is a list of recognized Java properties which are used to determine the font size:

  128       private static final String[] defaultNames = {
  129           "swing.plaf.metal.controlFont",
  130           "swing.plaf.metal.systemFont",
  131           "swing.plaf.metal.userFont",
  132           "swing.plaf.metal.controlFont",
  133           "swing.plaf.metal.controlFont",
  134           "swing.plaf.metal.smallFont"
  135       };

So, what you need to do is to make sure these are set appropriately before JMeter starts. This is environment dependent, but I assume you use Windows and you are launching JMeter via the jmeter.bat file. Just add these lines somewehere near the top of the jmeter.bat file:

set JVM_ARGS=%JVM_ARGS% -Dswing.plaf.metal.controlFont=Dialog-20
set JVM_ARGS=%JVM_ARGS% -Dswing.plaf.metal.systemFont=Dialog-20
set JVM_ARGS=%JVM_ARGS% -Dswing.plaf.metal.userFont=SansSerif-18
set JVM_ARGS=%JVM_ARGS% -Dswing.plaf.metal.smallFont=SansSerif-16

Update: user lyaffe pointed out in comment that on a 4K laptop display you want to have fonts even bigger:

set JVM_ARGS=%JVM_ARGS% -Dswing.plaf.metal.controlFont=Dialog-32
set JVM_ARGS=%JVM_ARGS% -Dswing.plaf.metal.systemFont=Dialog-32
set JVM_ARGS=%JVM_ARGS% -Dswing.plaf.metal.userFont=SansSerif-20
set JVM_ARGS=%JVM_ARGS% -Dswing.plaf.metal.smallFont=SansSerif-20

Then start JMeter and make sure you use the Metal look and feel (Options -> Look and Feel -> Metal).

Unfortunately, this won't affect font used in the left pane. It is either explicitly set to some small value, I guess, or it is controlled via another Java property I missed. I wasn't able to find a comprehensive list of all Java properties used in Swing. There might be more properties for fonts. I someone knows it, tell us!