• Post Reply Bookmark Topic Watch Topic
  • New Topic

Multiline Button in java

 
manik kant
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HEllo friends...
how to create a multiline button in
swing...button size should be the same but
the contents should be in separate line
anybody to answer this question
 
deekasha gunwant
Ranch Hand
Posts: 396
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi manik,
U'll need to use html to create multiline button in swing.

b1 = new JButton("html first line b second line /html);

I've not put the angular brackets in the above code but u need to put it.
since Swing components like button/label support html so u can
have all the advantages of html like underline/italic/...........

WARNING
if u think u r using correct html and still u r not
getting it right. It means that u r not having correct version of swing that is version 1.1.1 because swing 1.1 does not support html

u can visit this url http://java.sun.com/docs/books/tutorial/uiswing/components/label.html#html
regards
deekasha

[This message has been edited by deekasha gunwant (edited September 12, 2000).]
[This message has been edited by deekasha gunwant (edited September 12, 2000).]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!