Re: JAVA TEXT AREA GUI problem



KL wrote:
Is anybody know how to create a JAVA TEXT AREA

That is one of ..
- Java text area (generic)
- Java TextArea (AWT)
- Java JTextArea (Swing)
...so please be specific and refrain from SHOUTING at us.

...with multiple color text

in each line?

Many Swing components are 'HTML aware',
but not JTextArea's .. E.G.

<sscce>
import javax.swing.*;

class HTMLTextArea {
public static void main(String[] args) {
String content =
"<html><body><h1>Ha!</h1><p style='color: red'>Blah...";
JTextArea ta = new JTextArea(content);
JOptionPane.showMessageDialog(null, ta);
JLabel l = new JLabel(content);
JOptionPane.showMessageDialog(null, l);
}
}
<sscce>

Andrew T.

.



Relevant Pages

  • Re: JAVA TEXT AREA GUI problem
    ... Andrew Thompson wrote: ... Java text area ... Java JTextArea (Swing) ... Many Swing components are 'HTML aware', ...
    (comp.lang.java.gui)
  • Re: JAVA TEXT AREA GUI problem
    ... Andrew Thompson wrote: ... Java text area ... Java JTextArea (Swing) ... Many Swing components are 'HTML aware', ...
    (comp.lang.java.gui)
  • comp.lang.java.gui FAQ
    ... Q1.3 There are so many Java FAQs. ... Q1.4 Does Sun support or endorse this FAQ? ... Q3.2 How do I update the GUI from another thread? ... Q4.2 What is the Swing single-threading issue? ...
    (comp.lang.java.gui)
  • comp.lang.java.gui FAQ
    ... Q1.3 There are so many Java FAQs. ... Q1.4 Does Sun support or endorse this FAQ? ... Q3.2 How do I update the GUI from another thread? ... Q4.2 What is the Swing single-threading issue? ...
    (comp.lang.java.programmer)
  • comp.lang.java.gui FAQ
    ... Q2.1 My GUI freezes or doesn't update. ... Q2.5 How to create a transparent or non-rectangular window? ... Q5.1 What is the equivalent of AWT's Canvas in Swing? ... Q5.3 How do I generate some charts / plots in Java? ...
    (comp.lang.java.gui)