File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes hi Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply locked New topic


hari thatikonda

Joined: Sep 09, 2004
Posts: 11
hi can u place two lines with different font and size on one jlabel with ou html
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24199

You've already asked this here and gotten answers from some Really Smart People. HTML is the only way to get formatted text in a JLabel.

If you don't want to use HTML for some reason, then you could just use two JLabels, one on top the other, packed into a vertical Box.

I'm closing this thread; if the discussion needs to be continued, do so at the link above.

[Jess in Action][AskingGoodQuestions]
I agree. Here's the link:
subject: hi
It's not a secret anymore!