Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-3723

GuiBuilder: titledborder creates false font definition

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 11.0
    • None
    • guibuilder - Code
    • None
    • MacOSX Yosemite, Windows 10, JDK 11

    • Important

    Description

      I used the Border Dialog of the GuiBuilder to set a TitledBorder on a JTextField. I noticed that every time I change the Title Color , a font definition appears auto-created to the code.

      Autocreated code before color change :

      jTextField1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, bundle.getString("TabStudentInfo.jTextField1.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.ABOVE_TOP)); // NOI18N

      Autocreated false code after color change  :

      jTextField1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, bundle.getString("TabStudentInfo.jTextField1.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.ABOVE_TOP, new java.awt.Font("Tahoma", 0, 11), java.awt.Color.pink)); // NOI18N

      This font definition should be something like a call to the UI Defaults so we don't have to hard code the font for each component we use TitledBorder .

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            markadrian Andrianos Papamarkou
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: