Interface Fonts-Erstellungsfehler

larsz98

Mitglied
Hallo liebe Community,
ich sitze jetzt schon länger an dem Problem dass ich keine "Font" erstellen kann. Ich gehe wie folgt vor :

Code:
import org.newdawn.slick.Font;
 public void init(GameContainer gc) throws SlickException {
        Font ueberschrift=new Font("Serif", bold, 32);} //<--bold wird als Fehler angezeigt.
 public void render(GameContainer gc, Graphics g) throws SlickException {
        g.setFont(überschrift);}
Ich benutze das Paket Slick2D.
Das Problem besteht darin, dass "bold" immer rot markiert wird. Ich habe es auch schon mit italic bzw. Font.bold ausprobiert, jedoch klappt das alles nicht.
Vielleicht kann mir einer von euch nochmal die Fonts näher bringen?
Fehlercode:
Code:
    bold cannot be resolved to a variable
 

Ähnliche Java Themen

Neue Themen


Oben