0

I tried one by one each of these methods : setting the BgAlign property to CENTER in the Resource Editor , myLabel.getStyle().setBackgroundAlignment(Style.BACKGROUND_IMAGE_ALIGN_CENTER); but the text of the Label is not centered vertically.

So how to make Label's text centered vertically ?

The following image shows the actual alignement of the Label's text :

enter image description here

bharath
  • 14,283
  • 16
  • 57
  • 95

1 Answers1

1

Label vertical alignment is unsupported only its positioning in relation to an icon.

As far as I recall you are using FlowLayout for every entry which does support vertical alignment see FlowLayout.setValign(Component.CENTER).

Sergey Glotov
  • 20,200
  • 11
  • 84
  • 98
Shai Almog
  • 51,749
  • 5
  • 35
  • 65