Hello everyone,
I just wanted to change the font-family of a String drawed in the Graphics, and thus included in the contructor of my class:
where myFont is a Font.InputStream inputStream= this.getClass().getResourceAsStream("/fonts/myFont.ttf"); myFont= Font.createFont(Font.TRUETYPE_FONT, inputStream); inputStream.close();
The font located in '\build\classes\fonts\' exists and works fine in another programm (like MS Word). But even if I have integrated my few codelines, the font remains the same, when I run the project in Netbeans. The font is beeing set with
where g is my Graphics
Since I wrote the code-lines in question, when I build the programm as runtime, absolutely nothing works anymore, the window remains empty (even if in NetBeans it still works, just without the usage of the new font). What could be the problem, what is my mistake? There are no error-messages coming from the compiler!