Devi usare il metodo che eredita dalla classe JComponent:
codice:
setFont
public void setFont(Font font)
Sets the font for this component.
Overrides:
setFont in class Container
Parameters:
font - the desired Font for this component
See Also:
Component.getFont()
E l'oggetto Font lo crei usando il costruttore
codice:
Font
public Font(String name,
int style,
int size)
Creates a new Font from the specified name, style and point size.
Parameters:
name - the font name. This can be a logical font name or a font face name. A logical name must be either: Dialog, DialogInput, Monospaced, Serif, or SansSerif. If name is null, the name of the new Font is set to the name "Default".
style - the style constant for the Font The style argument is an integer bitmask that may be PLAIN, or a bitwise union of BOLD and/or ITALIC (for example, ITALIC or BOLD|ITALIC). If the style argument does not conform to one of the expected integer bitmasks then the style is set to PLAIN.
size - the point size of the Font
Since:
JDK1.0
See Also:
GraphicsEnvironment.getAllFonts(), GraphicsEnvironment.getAvailableFontFamilyNames()
Per quel che riguarda sfondo e colore fai una ricerca, se ne è parlato proprio qualche tempo fa.
Un consiglio per tutti i programmatori JAVA, scaricatevi dal sito Sun tutta la documentazione in linea in modo da poter consultare velocemente tutti i metodi di tutte le classi!