Problem in nifty GUI elements sizes in lower resolution

I coded a game using jme 3 and nifty gui in a system that have 3840-2160 resolution …

but when I test it in a system with 1280-1024 resolution, panel size not correct and also their position changed a little …

some images are so tiny (icons in hud)…

is nifty element sizes in percent system ? so why and have can I show hud and gui in lower systems?

or I have to develop and test my games in lower resolutions ?

You can activate global scaling in the nifty instance. Idk how exactly, look at the API/Javadoc.

no change in result …
can you tell me how can I calculate aspect ratio of screen resolution (it`s mathematical formula)?

You can use percents and pixels when setting the sizes.

int width = app.getSettings().getWidth();
int height = app.getSettings().getHeight();
float aspect = (float)width / height;

nifty.enableAutoScaling(1024, 768);
nifty.enableAutoScaling(1024, 768, 2.0, 2.0);

and: