3

I would like to know if there are methods of automatically increasing the font size based on the size of a component. I have this gui here: Hovewer if i increase the size of the frame, it becomes like this: the font size doesn't increase. and i don't have an idea on how to make this work.

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
f3ell0w
  • 105
  • 2
  • 6
  • 1
    Hope this will be helpful: http://stackoverflow.com/questions/2989107/change-font-size-of-a-jpanel-and-all-its-elements – Masudul Jun 30 '13 at 16:08
  • 1
    There are multiple ways to increment font size using swing/awt. Could you show us some code? – Tdorno Jun 30 '13 at 16:23

1 Answers1

4

Some L&Fs support a sizeVariant, illustrated here with com.apple.laf.AquaLookAndFeel. Alternatively, you can scale the font to fill the space allocated by your chosen layout, as shown here.

image

Community
  • 1
  • 1
trashgod
  • 203,806
  • 29
  • 246
  • 1,045