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

javax.swing.border.TitledBorder does to not have a default TitleFont

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P4 P4
    • 8
    • 7
    • client-libs

      FULL PRODUCT VERSION :
      java version "1.7.0"
      Java(TM) SE Runtime Environment (build 1.7.0-b147)
      Java HotSpot(TM) 64-Bit Server VM (build 21.0-b17, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Linux XXX 2.6.40.4-5.fc15.x86_64 #1 SMP Tue Aug 30 14:38:32 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

      A DESCRIPTION OF THE PROBLEM :
      In the class javax.swing.border.TitledBorder the method getTitleFont() does not have a default font if one is not specifically set in the constructor. Previous versions of Java returned a default font instead of null.

      REGRESSION. Last worked in version 6u26


      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      TitledBorder b = BorderFactory.createTitledBorder(BorderFactory.createLineBorder(new Color(0, true)), title);
      b.setTitleFont(b.getTitleFont().deriveFont(Font.PLAIN, 10f));
      ---------- END SOURCE ----------

            rupashka Pavel Porvatov (Inactive)
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: