For automatic test purposes is a must to have the text set because is the identification used by robot to navigate though screens.
I need to create a JButton
with text and icon but only show the icon.
I have tried several things:
use of
setHideActionText(true)
:jButton button = new JButton(icon); jButton.setHideActionText(true); jButton.setText(_messageManager.getMessage(messageKey));
setHoritzontalTextPosition
setVerticalAlignment
but none worked.
Anyone has any idea on how to solve this?