In my Java Swing application, I have buttons. If the screen size is changed, I want to change the font of my button text also.
How do I implement it?
In my Java Swing application, I have buttons. If the screen size is changed, I want to change the font of my button text also.
How do I implement it?
GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds()
?I believe that you need a JFrame window listener and simply change the button attributes there:
Thanks to all,
Based on listeners and frame size, border size and actual panel size I have figured font sizes for various screen size ranges.