How to change the default font size of Java swing components [duplicate]
Asked Answered
S

2

8

When doing Java JFrame design, I need to edit the font size and font type manually each time drag and drop from the Swing palette. The default font of Java Swing components is Tahoma 11 plain.

What I want is the font size and font type to be set to Tahoma 15 plain when I drag JTextfield and then JLabel. So I don’t need to change manually anymore.

Slipshod answered 15/6, 2013 at 9:29 Comment(0)
S
5

Adjusting the UIDefaults is one way. Another is to design a pluggable look & feel.

Socialize answered 15/6, 2013 at 11:5 Comment(0)
R
4

This is not a netbeans platform problem. Use the UIManager class to set the Font for the whole program. Hope these links will help you.

Setting the Default Font of Swing Program

Setting the Global Font for a Java Application

Resect answered 15/6, 2013 at 9:40 Comment(1)
Thank you and sorry for lateCigarette

© 2022 - 2024 — McMap. All rights reserved.