• Post Reply Bookmark Topic Watch Topic
  • New Topic

JButton doesn't display "+" or "-"  RSS feed

 
Darren Hicks
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
If I have the following:
JButton btnAdd = new JButton();
btnAdd.setText( "+" );
I end up seeing a button with "..." on it.
But if instead I use HTML:
btnAdd.setText("<html><br>+</html>");
It shows up fine ( with a line break, too! )...
What is going wrong with the setText("+")?
FYI, it works fine on Macintosh but gives the "..." behaviour on my Windows machine.
tia...
 
Paul Stevens
Ranch Hand
Posts: 2823
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Works fine on mine. Maybe you need to post your code.
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The "..." shows up when there is insufficient room to display the text.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!