• Post Reply Bookmark Topic Watch Topic
  • New Topic

Display mnenomic in JButton

 
James Knight
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to display a mnemonic on the text of a JButton. The text needs to be displayed on two lines in the button:
public static final String HELLO_WORLD_CONST = "<html><b>Hello<BR> World</b></html>";

The problem is when i set the mnemonic on the JButton, it doesnt appear.
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
just wrap the letter in <u> tags
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!