javaswingwindows-10citrix

Window title font too big


TL;DR

Size of font in title bar of Swing windows is too big. How can I make it smaller?

Details

Oracle Java 1.8.0_201 (32 bit)

I have a Dell laptop.
Windows 11 Pro (version 22H2)
Processor: 11th Gen Intel(R) Core(TM) i5-1145G7 @ 2.60GHz 1.50 GHz
Installed RAM: 16.0 GB (15.4 GB usable)

I am using a virtual desktop via Citrix. Virtual desktop has Windows 10 (Enterprise, 64 bit). It also has 16 GB of memory.

Below is a screen capture of a JOptionPane on the virtual desktop.

JOptionPane (good)

This is correct and how it should be.
However, on another computer, using the same configuration as described above, it looks different. Here is a screen capture of the other computer. Note that the other computer is the exact same laptop as mine.

JOptionPane (bad)

The main problem is that the size of the font of the window title is bigger than it should be. How can I make it smaller?

Note that the displays of both computers are the same, i.e. scaling is set to 100% and screen resolution is 1920×1080
Are there other settings that I should check?

Also note that both computers use a dual monitor docking station as demonstrated in this YouTube video.

EDIT

Granted, regarding the screen captures above, the differences don't impact the GUI, however they do impact the main application window, i.e. the application's top-level JFrame as shown in below screen capture.

Application JFrame

I have purposely removed the window title (for confidentiality purposes), however the font size is larger than it should be and as a result, the toolbar at the bottom of the window is only partially displayed and this is the problem. The JFrame dimensions are fixed (i.e. hard coded) and since the window title takes up more height (due to the larger font size), it comes at the expense of the toolbar height. Changing the window dimensions – including removing them entirely in order to let Swing determine the optimal window size – is not an option. Hence I believe that the solution is to reduce the size of the font used in the window title bar.

The application was purchased from a third party. It runs on thousands of computers with the exact same configuration as mine (as described above, including the exact same Dell laptop and virtual desktop) but the problem occurs on only a very few (less than ten). Also, the application has been in use for several years, initially on PCs. The problem only began when we moved from each person having his own, dedicated [physical] PC to the environment described above, i.e. a virtual desktop on a laptop in a dual monitor docking station.

EDIT 2 (15th May, 2023)

To clarify regarding the virtual desktop. Via Citrix desktop we are connecting to an actual, physical computer and not a virtual computer, hence the display settings are those of the physical computer.


Solution

  • One way I found to resolve the problem.

    1. Right click on the desktop (of the physical computer that is displayed as a Citrix virtual desktop) and select Display Settings from the menu.

    desktop menu

    1. In the Display Settings window, click on Advanced display settings.

    Display Settings

    1. In the Advanced display settings window click on Advanced sizing of text and other items.

    Advanced display settings

    1. In the Display window, select a smaller size for Title bars.
      (I selected 8.)

    Display

    The result is that the title bar of the [Swing] JFrame has less height which results in the toolbar not being cut off.