how to change font size in JLabel
label = new JLabel("A label");
label.setFont(new Font("Serif", Font.PLAIN, 14));
how to change font size in JLabel
label = new JLabel("A label");
label.setFont(new Font("Serif", Font.PLAIN, 14));
JLabel font
import java.awt.Font;
import javax.swing.*;
public class SwingDemo {
public static void main(String args[]) {
JFrame frame = new JFrame("Label Example");
JLabel label;
label = new JLabel("First Label");
label.setBounds(50, 50, 100, 30);
label.setFont(new Font("Verdana", Font.PLAIN, 18));
frame.add(label);
frame.setSize(300,300);
frame.setLayout(null);
frame.setVisible(true);
}
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us