File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Swing / AWT / SWT
JTextField with a DefaultStyledDocument
Joined: Aug 18, 2004
Jun 02, 2005 04:33:00
I want to use a default styled document with a
in order to implement a spellchecker and make incorrect words turn red.
I have this working on a
, but for some reason I can not get the red style to work with a
It is like the fancy styles are getting ignored by the
even though I have explicitly set it to use a
as the data model.
Does anyone have any suggestions?
SCJP 1.4 91%, SCJP 1.5 88%, SCJD B&S
Joined: Jan 14, 2004
Jun 02, 2005 09:39:00
does not support styled content. The 'setDocument' method is used mainly for extensions of
designed for input constraint (like the newer
) as shown in the api.
is the minimum choice for text styling.
I agree. Here's the link:
subject: JTextField with a DefaultStyledDocument
JTABLE + JTEXTFIELD....
To change the color of a few characters in a JTextArea - urgent
Convert DefaultStyledDocument to HTMLDocument
retrieve the data from JTextField
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014