Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > How to display the texts into 2 line in JButton?

Reply
Thread Tools

How to display the texts into 2 line in JButton?

 
 
James
Guest
Posts: n/a
 
      11-11-2003
hi, I am newbies here.
I want to display 2 words in jbutton but if I use setText("Add Record");
When display, it show Add record (in a line)
I want it display as
Add
Record
(2lines)
in jbutton?
How to do that?



 
Reply With Quote
 
 
 
 
Thomas Kellerer
Guest
Posts: n/a
 
      11-11-2003
James schrieb:

> hi, I am newbies here.
> I want to display 2 words in jbutton but if I use setText("Add Record");
> When display, it show Add record (in a line)
> I want it display as
> Add
> Record
> (2lines)
> in jbutton?
> How to do that?
>
>
>

setText("<html>Add<br>Record</html");


 
Reply With Quote
 
 
 
 
Moshe Sayag
Guest
Posts: n/a
 
      11-11-2003
For more detailed information check out the following "Tech Tips" from Sun:

"Displaying Multiline Text"
http://developer.java.sun.com/develo...0723.html#tip2

Moshe

James wrote:

> hi, I am newbies here.
> I want to display 2 words in jbutton but if I use setText("Add Record");
> When display, it show Add record (in a line)
> I want it display as
> Add
> Record
> (2lines)
> in jbutton?
> How to do that?
>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hierarchical commnd line parsing / help texts Gelonida N Python 2 09-28-2011 12:45 PM
DBD::mysql used to take octets into the utf8 texts but no more inmariadb Peter Vereshagin Perl Misc 3 03-17-2011 12:28 PM
Verilog & VHDL reference texts HDL Book Seller VHDL 0 08-31-2004 03:13 PM
Bone up on VHDL & Verilog with these great reference texts at 60% off Amazon HDL Book Seller VHDL 0 08-06-2004 05:00 PM
Looking for top Verilog, VHDL reference texts? HDL Book Seller VHDL 0 05-27-2004 03:02 PM



Advertisments