O'Reilly logo

Graphic Java™ 2, Volume II: Swing, Third Edition by David M. Geary

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 22. Text Components

Swing provides two distinct types of text components: simple text controls that can only display one font and one color at a time and styled text components that can display multiple fonts and colors. The former are text fields (JTextField), password fields (JPasswordField), and text areas (JTextArea); the latter are editor panes (JEditorPane) and text panes (JTextPane).

Text fields and text areas are useful for editing plain text. JTextField and JTextArea are nearly source compatible with their AWT counterparts: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required