문제

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.

도움이 되었습니까?

해결책

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

다른 팁

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top