create button with image and text
I want to create a button with text and image.
I want the text to be upon the image and centered,, but couldn't find such option.
for example the following code make a button from an image but the text is under the image:
Button button = new Button("TEXT", image);
I tried as well to create the button with text only and to set the image as BG, but the button dimension fitted only the text not the image, so I couldn't see the full image:
Button button = new Button("TEXT");
is it possible to make the button fit the image size instead of the text in this case?