Search:

Type: Posts; User: Mythano

Search: Search took 0.19 seconds.

  1. Replies
    22
    Views
    1,688

    Re: Problem loading TrueType Fonts

    Oh no, I was right, I AM a stupid fool! I just checked every single possible problem, that could cause this unnormal effect in my real project. Because in fact, in the testfiles, most of the time,...
  2. Replies
    22
    Views
    1,688

    Re: Problem loading TrueType Fonts

    Firsty located under "G:\JavaApplication11\dist" - Java returned: "jar:file:/G:\JavaApplication11/dist/JavaApplication11.jar!/TestCode23.class"
    Then located at "G:\asd\JavaApplication11\dist" - Java...
  3. Replies
    22
    Views
    1,688

    Re: Problem loading TrueType Fonts

    Yes, thanks, now it works.:o But I don't understand why? What was now the problem, or differently asked, how can I apply this success to my real project, where the jar still doesn't work. May it...
  4. Replies
    22
    Views
    1,688

    Re: Problem loading TrueType Fonts

    You are right, it isn't "TestCode23.jar\testcode23.class", but it is "TestCode23.jar\testcode23\TestCode23.class". So I changed the code to:

    public class TestCode23 {
    public static void...
  5. Replies
    22
    Views
    1,688

    Re: Problem loading TrueType Fonts

    Okay. Either I am a stupid fool, or my Java installation is crap. I reprodused exactly the same what you did; please look at the Screenshot, isn't it the same? 3243
    But it still returns "null", I...
  6. Replies
    22
    Views
    1,688

    Re: Problem loading TrueType Fonts

    I don't see what the location of the jar itself can change much, even so I did what you proposed. I actually tested the jar-file now from four different locations, including one form my USB-Device;...
  7. Replies
    22
    Views
    1,688

    Re: Problem loading TrueType Fonts

    Okay. My InputStream is obviously null in the jar (only in the jar). When I try to catch the path using what Google told me for that:
    File jarDir = new...
  8. Replies
    22
    Views
    1,688

    Re: Problem loading TrueType Fonts

    Yes, of course that, but it is still the same command the programm uses, isn't it? I mean, in NetBeans it works very well, just the jar does not work. And with this.getClass(), shouldn't it search...
  9. Replies
    22
    Views
    1,688

    Re: Problem loading TrueType Fonts

    But indeed what's strange is, that if I call it in NetBeans after having add this

    System.out.println(inputStream);
    to the code, so I will get
    java.io.BufferedInputStream@6bf7606bBut when I...
  10. Replies
    22
    Views
    1,688

    Re: Problem loading TrueType Fonts

    Well, it remains the same: "fonts/myFont.ttf" (I've added a screenshot showing it). And in the code it is called by
    InputStream inputStream=...
  11. Replies
    22
    Views
    1,688

    Re: Problem loading TrueType Fonts

    Of course you are right! Now I changed the code to
    g.setFont(myFont.deriveFont(18.0f));
    Now it works when I run it in NetBeans. But the problem still exists, when I build it and execute it as...
  12. Replies
    22
    Views
    1,688

    Problem loading TrueType Fonts

    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:

    InputStream inputStream=...
Results 1 to 12 of 12