Article View: es.comp.lenguajes.java
Article #25644Re: TextArea y color
From: Juan Gonzalo de Silva Medina
Date: Sat, 13 Mar 1999 00:00
Date: Sat, 13 Mar 1999 00:00
52 lines
1880 bytes
1880 bytes
Juan wrote: > > Como se puede hacer para que dentro de un mismo TextArea pueda presentar > lineas de texto con diferentes colores por linea. > > Gracias. Visto que necesitas más información, y para no dejar este hilo cojo aquí tienes la respuesta: lo puedes encontrar en la clase com.sun.java.swing.JEditorPane (en el swing 1.0.3) en el 1.1 sólo tienes que cambiar el valor com. por javax. (si no mal recuerdo). ------------->8----------->8-------------------- public class JEditorPane extends JTextComponent A text pane to edit various kinds of content, such as html and rtf. This component uses implementations of the EditorKit to accomplish its behavior. It effectively morphs into the proper kind of text editor for the kind of content it is given. The content type that editor is bound to at any given time is determined by the EditorKit currently installed. If the content is set to a new URL, its type is used to determine the EditorKit that should be used to load the content. For the keyboard keys used by this component in the standard Look and Feel (L&F) renditions, see the JEditorPane key assignments. -- Juan Gonzalo de Silva Medina http://www.caymasa.es/usr/gonzalo Red-Hat Linux 2.0.36 (#95838) & Java
Technical Details
Message-ID:
<36EA3CA9.AA471DBF@caymasa.es>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<36E679E2.3E4D7397@duward.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: 1116f3,796bfb7cd4e76a33 X-Google-Attributes: gid1116f3,public From: Juan Gonzalo de Silva Medina <gonzalo@caymasa.es> Subject: Re: TextArea y color Date: 1999/03/13 Message-ID: <36EA3CA9.AA471DBF@caymasa.es> X-Deja-AN: 454502574 Content-Transfer-Encoding: quoted-printable References: <36E679E2.3E4D7397@duward.com> To: Juan <duward@duward.com> X-Accept-Language: es-ES, en Content-Type: text/plain; charset=iso-8859-1 Organization: El Torito Mime-Version: 1.0 Newsgroups: es.comp.lenguajes.java