File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes font size and style Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "font size and style" Watch "font size and style" New topic

font size and style

oghenekaro EFEKODO
Ranch Hand

Joined: Oct 10, 2005
Posts: 56
pls,i'am a beginner in java and have being trying to write a code to (1).change the font size of a text.(2). change the font style of a text.(3)use dialog boxes effectively but failed.pls i need to tell me how to go about it and if you can help me with the code
Joel McNary

Joined: Aug 20, 2001
Posts: 1824

You can use the setFont() method of a component. You can get more information in our Swing forum, so I'm transferring this thread to that forum.

Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.
Craig Wood
Ranch Hand

Joined: Jan 14, 2004
Posts: 1535
I agree. Here's the link:
subject: font size and style
It's not a secret anymore!