I have little problem with my code. I can't use variable "font" when I loaded it.
try{
font = Font.createFont(Font.TRUETYPE_FONT, new FileInputStream(new File("Font/M2c Light.ttf"))).deriveFont(Font.PLAIN,24);
}catch(Exception ex){
ex.printStackTrace();
}
and when i want to use it on button
Button.setFont(font);
and that error shows me:
variable font might not have been initialized