Skip to content

Java code snippet – How to change font size in JLabel?

label = new JLabel("A label");
label.setFont(new Font("Serif", Font.PLAIN, 14));
See also  How to get the size of an object in Python?
, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.