Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8106225

[JDK 1.5] Font.font(null, FontWeight.BOLD, FontPosture.ITALIC, 28) throws NPE: java.util.Hashtable.put

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • fx1.1
    • None
    • javafx

      OS: Windows XP
      JAVA_HOME=C:\Program Files\Java\jdk1.5.0_09

      Run the example:
      -----------------------------------------------------------------------------------------------------------------
      import javafx.stage.Stage;
      import javafx.scene.Scene;
      import javafx.scene.text.*;

      Stage {
          width: 400
          height: 250
          scene: Scene {
              content: Text {
                      font: Font.font(null, FontWeight.BOLD, FontPosture.ITALIC, 28);
                      x: 10
                      y: 70
                      content: "Hello World!"
                  }
          }
      }
      -----------------------------------------------------------------------------------------------------------------

      java.lang.NullPointerException
              at java.util.Hashtable.put(Hashtable.java:396)
              at java.util.Hashtable.putAll(Hashtable.java:470)
              at java.util.Hashtable.<init>(Hashtable.java:201)
              at java.awt.Font.initFromMap(Font.java:496)
              at java.awt.Font.<init>(Font.java:483)
              at javafx.scene.text.Font.font(Font.fx:148)
              at javafxapplication6.Main.javafx$run$(Main.fx:18)
              at javafxapplication6.Main.javafx$run$(Main.fx:18)

            idk Igor Kushnirskiy (Inactive)
            alexsch Alexandr Scherbatiy
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: