Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
557 views
in Technique[技术] by (71.8m points)

java - How do I get the default font for Swing JTabbedPane labels?

Does the text in Swing components have a default font? In particular, what about tab labels on JTabbedPanes?

I'm working on a mock-up of a GUI made with Swing and want it to blend it with a screen image I grabbed of a Swing app.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

It depends on the Look and Feel. If it's an application you've written, get the values from UIManager.getDefaults().getFont("TabbedPane.font")


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...