This tutorial will show you how to set JLabel custom Font. Related Tutorials: How to Disable a JLabel using Enabled Method Cr...
This tutorial will show you how to set JLabel custom Font.
Related Tutorials:
Setting JLabel Font Code Example
[
import javax.swing.JLabel; import javax.swing.JFrame; import java.awt.Dimension; import java.awt.Font; public class JLableDisableExample { public static void main(String args[]) { JFrame frame=new JFrame("JLabel Example"); JLabel label=new JLabel("JLabel set Font"); //Label Set Font Font font=new Font("Times new Roman",Font.BOLD,14); label.setFont(font); /******************/ label.setBounds(0, 0, 200, 30); frame.add(label); frame.setSize(new Dimension(300,300)); frame.setLayout(null); frame.setVisible(true); } }
]