1

I have a laptop with a new and high resolution screen (3840 x 2160) and I am trying to implement a Java Swing interface with a JSlider control. The problem is, the control part of the slider does not seem to scale with the screen resolution and so appears to be microscopic. Not the width of the whole slider bar, which is trivially settable, just the control part that a user will have to grab hold of with a mouse interface. Using this slider is an exercise in frustration.

Changing the screen resolution during use is not a desired solution. (And doesn't seem to work, anyway.)

If slider.putClientProperty("JComponent.sizeVariant", "large"); is doing anything useful, it is beyond my eyes' ability to perceive.

Is there a way to change the size of this interface?

Novak
  • 4,687
  • 2
  • 26
  • 64
  • ["Might" be of some help](http://stackoverflow.com/questions/15659044/how-to-set-the-dpi-of-java-swing-apps-on-windows-linux) – MadProgrammer Oct 25 '15 at 22:16
  • @MadProgrammer more work than I was hoping for, but potentially useful. Thanks. – Novak Oct 25 '15 at 22:19
  • In the interim, `JSlider` has useable focus & key bindings. – trashgod Oct 26 '15 at 11:34
  • @trashgod I have a hard requirement for swift adjustments on a large and a small scale. I'll be using key bindings (and buttons) for the latter, but I cannot sacrifice the former. I'm willing to look at other Swing elements I may have overlooked, but I cannot have someone clicking madly to get from one side of the slider to the other. – Novak Oct 26 '15 at 16:37
  • You could try changing `thumbRect` in the `SliderUI` seen [here](http://stackoverflow.com/a/6996263/230513). – trashgod Oct 26 '15 at 20:41

0 Answers0