As the question says… I can set the layout etc. up to resize with the window, but I’ve not worked out how to make the fonts resize.
(Actually it might be the JLabel components themselves that aren’t resizing, and constraining the fonts…)
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You would probably have to set up some kind of listener to track changes in the size of the window (or applet, or layout), and call either
setFont()orsetAffineTransform()to keep the size of the font synchronized.One of the reasons font rendering is done the way it is, is so that fonts can have a consistent size on different screen resolutions and layouts. The system isn’t really meant to scale fonts with the layout.