Results 1 to 1 of 1
Thread: Including HTML in a JLabel
-
Including HTML in a JLabel
Example code below shows how to include HTML in JLabel.
Output:Java Code:import javax.swing.*; public class HTMLLabelApplet extends JApplet { public void init( ) { JLabel theText = new JLabel( "<html>Hello! This is a multiline label with <b>bold</b> " + "and <i>italic</i> text. <P> " + "It can use paragraphs, horizontal lines, <hr> " + "<font color=red>colors</font> " + "and most of the other basic features of HTML 3.2</html>"); this.getContentPane( ).add(theText); } }
Similar Threads
-
JLabel append?
By Jononomous in forum New To JavaReplies: 0Last Post: 04-07-2008, 07:41 PM -
Including JAR in applications
By bugger in forum New To JavaReplies: 0Last Post: 01-11-2008, 09:36 AM -
How to use JLabel with html
By leonard in forum AWT / SwingReplies: 1Last Post: 08-06-2007, 04:43 PM -
JLabel
By Jack in forum AWT / SwingReplies: 2Last Post: 07-02-2007, 01:55 PM -
JLabel
By Freddie in forum AWT / SwingReplies: 2Last Post: 05-29-2007, 02:19 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks