I need to create a java.awt.Font
object for my project and it needs to be available for the whole application. I cannot install the font to the system and any help regarding creating the font object in the runtime is needed.
My JDK is 1.7.0_17 and my code is the following.
try {
Font f = Font.createFont(Font.TRUETYPE_FONT, new File("DL-Paras...ttf"));
jLabel1.setFont(f);
} catch (Exception ex) {
ex.printStackTrace();
}
Can objects be called like the system properties throughout the application instance? Thanks in advance.
EDIT: Thank you all, I got the answer.