sorry for the duplicate messages.
I have found the solution!Share it
public class DataManageAction extends AbstractAction implements Presenter.Toolbar{
//etc
public Component getToolbarPresenter() {
return new ToolBarButton(this);
}
}
public class ToolBarButton extends JButton {
public ToolBarButton(Action a) {
super(a);
setBorder(javax.swing.BorderFactory.createEmptyBorder(2, 2, 2, 2));
setMargin(new java.awt.Insets(2, 2, 2, 2));
setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
}
}
jimlaren wrote:
Hey all,
I need to show button's Icon and Text in ToolBar,the icon is above the
text,I tried my best to achieve this effect,but I failed.
tks in advance !
jim