• Post Reply Bookmark Topic Watch Topic
  • New Topic

JtoggleButton, JCheckBoxMenuItem & Action  RSS feed

 
Korol Bloom
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have an Action that should be triggered by a JToggleButton (from a JToolBar) and a JCheckBoxMenuItem (from a JMenu). The Button should display an icon, the menu item should display both icon and text.
The problem is: By default the JToggleButton displays both text and icon, and I need to find a way to hide the text. For a common JButton you can do this by

, but this does not work for a JToggleButton. Does anybody know a solution? Maybe I could try a JToggleButton subclass or don't use Action for the button, but this doesn't seem to be the proper way.
, korol
 
Korol Bloom
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok, it seems to be easy:

, korol
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!