I am trying to change the font for my GUI besides the basic 5 that swing seems to come with. How to import fonts and actually use them in my code?
You can try with this:
Font font = Font.createFont(Font.TRUETYPE_FONT, fontStream);
Next,
GraphicsEnvironment.getLocalGraphicsEnvironment().registerFont(font);
And,
new Font("nameOfFont", Font.BOLD, 13)