Having trouble setting up a custom java font -


Java fonts are about to win.

Here's my current coding, it's just an easy way to font from the file, then it comes back, but I'm missing something, I do not know ... can anyone help ?

  Create a private font font () {try {URL FontUrl = getClass (). GetClassLoader (). GetResource ("Res / Fonts / aesysmatt.ttf"); Font mFont = font.create font (font. TRUETYPE_FONT, fontUrl.openStream ()); . GraphicsEnvironment.getLocalGraphicsEnvironment () registerFont (font); Return mFont; } Hold (font format exposure | IOException e) {e.printStackTrace (); } Return tap; }  

Here are my errors that appear:

  Inequality on java.lang.NullPointerException. Charteration CollardButton.Courtfont (Colorful buttons. Java: 21) on inequality. Character Creation. Collated Button & Lt; Init & gt; (Colorful buttons.Java 37) On inequality. Character Creation. StartInine Interlise (StartScreen.Javaah: 93) On Inequality Character Creation. StartScreen & Lt; Init & gt; (StartScreen. Java: 61) On Inequality Character. Start. Screen $ 2.run (start.screen.java:48) on java.awt.event.InvocationEvent.dispatch (InvocationEvent.java:251) java.awt.EventQueue.dispatchEventImpl (EventQueue.java:733) Java.awt. $ 3.run (EventQueue.java:694) at java.awt.EventQueue $ 3.run (EventQueue.java:692) at $ 200 (EventQueue.java:103) java.awt.EventQueue on EventQueue.access. Privilege on java.awt.EventQueu at security.AccessController.domain.security.ProtectionDomain $ 1.doIntersectionPrivilege (ProtectionDomain.java:76) (Basic Method) Java.awt.EventDispatchThread.pumpOneEventForFilters etc. (EventQueue.java:703) Java.awt.EventDispatchThread.pumpEventsForFilter at (EventDispatchThread.java:161) java.awt.EventDispatchThread.pumpEventsForHierarchy (EventDispatchThread .java: 150) at java.awt.EventDispatchThread.pumpEvents (EventDispatchThread.java146) java.awt .EventDispatchThread.pumpEvents at (EventDispatchThread.java:138) on java.awt.EventDispatchThread.run (EventDispatchThread.java:91)  

Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -