How to use jmeter ui on ultra high resolution display
Asked Answered
W

5

32

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?

Wiry answered 5/8, 2014 at 17:48 Comment(0)
M
33

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!

Madelon answered 16/12, 2015 at 11:16 Comment(5)
Using a laptop with 4K resolution the following settings work reasonably. Some of the labels are tiny but readable. 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-20Daunt
Good try but, although fonts are now larger, the UI elements themselves don't expand in a relative manner. The result is that some of the controls are not fully visible. (Btw, I can achieve the same result without changing the .bat file - all you need to do is zoom in using CTRL+mouse wheel (this latter solution also affects the font in the left pane))Grew
I want to set window size + position. It opens nearly full size on a 4k display and is very annoying.Astigmia
Just setting GDK_SCALE=2 worked well for me.Hombre
Through my test, I found that the font attribute parameters can be obtained through the font in the Excel sheet. For example, the font in the Excel table is "Microsoft YaHei UI", which can be configured as "JVM_ARGS=%JVM_ARGS% -Dswing.plaf.metal.userFont=Microsoft YaHei UI" in jmeter. Of course, the font size can also be specified, such as "JVM_ARGS=%JVM_ARGS% -Dswing.plaf.metal.userFont= Microsoft YaHei UI-15".Hurtado
R
9

Since version 3.1 from JMeter you can do that by modifying user.properties as per this doc:

jmeter.hidpi.mode set to true to activate a 'pseudo'-hidpi mode allowing to increase size of some UI elements jmeter.hidpi.scale.factor set to 2.0 to scale the size of some UI elements

jmeter.toolbar.icons.size with these values: 22x22 (default size), 32x32 or 48x48 (Suggested value for HiDPI) jmeter.tree.icons.size with these values: 19x19 (default size), 24x24, 32x32 (Suggested value for HiDPI) or 48x48 Additionally you can increase the font size of the text areas in some elements like JSR223 sampler by changing theses properties:

jsyntaxtextarea.font.family set to Hack to activate and to change the font and their size jsyntaxtextarea.font.size set to a greater value, like 28 (Suggested value for HiDPI)

Note you can also zoom in/out by using CTRL +/-

Retrogradation answered 19/8, 2017 at 16:9 Comment(2)
The CTRL +/- was just what I needed. Thanks!Bucci
Or, Ctrl + Scroll up/downPedicel
B
5

On Ubuntu do the following:

  • Open bin/user.properties in Jmeter's installation directory (mine was ~/apache-jmeter-5.2.1).

  • Add the following lines at the end of the file:

    jmeter.hidpi.mode=true

    jmeter.hidpi.scale.factor=2.0

    jmeter.toolbar.icons.size=48x48

    jmeter.tree.icons.size=48x48

    jsyntaxtextarea.font.family=Hack

    jsyntaxtextarea.font.size=28

    swing.plaf.metal.controlFont=Dialog-20

    swing.plaf.metal.systemFont=Dialog-20

    swing.plaf.metal.userFont=SansSerif-18

    swing.plaf.metal.smallFont=SansSerif-16

    swing.plaf.metal.controlFont=Dialog-32

    swing.plaf.metal.systemFont=Dialog-32

    swing.plaf.metal.userFont=SansSerif-20

    swing.plaf.metal.smallFont=SansSerif-20

  • Save the file

  • Open Jmeter and go to Options -> Look and Feel -> Metal

  • Restart Jmeter

Bree answered 20/6, 2020 at 22:32 Comment(2)
Best answer so farSoniasonic
Please try setting the above in system.properties in case updated user.properties doesn't help. I tried it on apache-jmeter-5.6.3 and on java 17Unseen
A
2

From Java 9 onward, use the parameter -Dsun.java2d.uiScale=200% either as command line argument or environment variable JVM_ARGS.

200% is the scale factor. It seems that only multiples of 100 are supported, such as 300% and so on.

Examples:

$ "/path/to/jmeter/bin/jmeter.sh" -Dsun.java2d.uiScale=200%

or

$ env JVM_ARGS=-Dsun.java2d.uiScale=200% "/path/to/jmeter/bin/jmeter.sh"

or

$ export JVM_ARGS="-Dsun.java2d.uiScale=200%"
$ /path/to/jmeter/bin/jmeter.sh
Axiology answered 12/9, 2022 at 15:19 Comment(0)
G
-4

I had this same issue, the above suggestion did nothing. However, I found out if you run the .bat file as administrator it seems to solve the problem.

I am running Windows 7 - 64 bit with high resolution display. Now the text is readable, otherwise the UI was completely useless.

Gilbertgilberta answered 17/6, 2015 at 16:27 Comment(1)
This didn't fix the issue for me ( Windows 8 - 64 bit )Negligee

© 2022 - 2024 — McMap. All rights reserved.