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

[Text] Button returns the bottom of the icon as baseline

    XMLWordPrintable

    Details

      Description

      Button (and presumably other widgets, like ToggleButton) correctly returns the text baseline if no icon is set. However, if an icon is set on the button the bottom part of that icon is returned instead, which is wrong.

      Baseline is used to align the text vertically on the text's baseline even if for instance there is graphics or if there are differently sized fonts in the text.

      This is how Swing worked and to my knowledge all other UI toolkits interprets baseline.

        Attachments

          Activity

            People

            Assignee:
            msladecek Martin Sládeček
            Reporter:
            mgrev Mikael Grev
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported: