Erk.
A better solution (IMO) is to extend JTextArea, and give it the look and
feel of a JLabel. The HTML solution seems kinda hacky to me - different OS's
give different font sizes, etc. I just don't like it that the line break is
hardcoded, and prefer Java to decide for me. The HTML solution
Hello,
im trying to use a JTabbedPane containing several JPanels.
When i click on the tabs ( or move another window over the Pane ) the
JTabbedPane
doenst display right.
The area around the tabs isnt painted correctly. It seems as if some
elements of the
JPanels ( Button, Table ... ) are
Hello,
im trying to use a JTabbedPane containing several JPanels.
When i click on the tabs ( or move another window over the Pane ) the
JTabbedPane
doenst display right.
The area around the tabs isnt painted correctly. It seems as if some
elements of the
JPanels ( Button, Table ... ) are
He Greg:
thats sounds like a good idea...Can you throw some light on the
JTextArea method ???
Regards,
Harkishin
-Original Message-
From: Greg Munt [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 06, 2001 5:30 AM
To: Harkishin Nachnani; alex; [EMAIL PROTECTED]
Subject: Re: multi-lined
You can use this:
public static final JComponent createMultiLineLabel(String text) {
// Count the number of newline characters in the text
StringTokenizer st = new StringTokenizer(text, \n);
int lines = st.countTokens();
JTextArea ta = new JTextArea(text, lines, 0);
In the updateUI method of your JTextArea subclass:
LookAndFeel.installBorder (this, Label.border);
LookAndFeel.installColorsAndFont (this, Label.background,
Label.foreground, Label.font);
The LookAndFeel class is in the javax.swing package.
-Original Message-
From: Harkishin Nachnani