How To Change JLabel Font In Java - Tutorialspoint
Maybe your like
- Home
- Whiteboard
- Online Compilers
- Practice
- Articles
- AI Assistant
- Jobs
- Tools
- Corporate Training
- Courses
- Certifications
- Switch theme
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
To change JLabel font, use the setFont() method −
JLabel lable = label.setFont(new Font("Verdana", Font.PLAIN, 18));Example
package my; 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); } }Output

karthikeya Boyini Updated on: 2019-07-30T22:30:26+05:30 15K+ Views
Kickstart Your Career
Get certified by completing the course
Get StartedTag » How To Change Jlabel Text
-
Change The JLabel Text In Java Swing | Delft Stack
-
Swing JLabel Text Change On The Running Application - Stack Overflow
-
Java Program To Change JLabel Text After Creation - Tutorialspoint
-
Java SWING #37 - Change Label Text On Button Click Java Netbeans
-
How To Change JLabel Font Style And Size In Java - CodeSpeedy
-
Java Swing How To - Change JLabel Text After Creation
-
Changing Label Text When Button Is Clicked - CodeRanch
-
How To Change The Tkinter Label Text? - GeeksforGeeks
-
Changing JLabel Text In Realtime - Oracle Communities
-
JLabel | Java Swing - GeeksforGeeks
-
How To Use Labels (The Java™ Tutorials > Creating A GUI With ...
-
How To Change Label Text Size And Font
-
How To Change A Jlabel Font Color, Name, Style, And Size In Java
-
How To Change Font Size And Font Style Of A JLabel - StackHowTo