Label : Java Glossary


Label

java.awt.Label is a component used to display decorative text on the screen to label some other component.

There is a fair bit of ingenuity in ways to make physical labels:

With java.awt.Label The user cannot ever modify the text, unlike TextFields. In AWT (Advanced Windowing Toolkit) you use Label, in Swing JLabel. Layout managers shift Labels about just like other components. End users can’t key into labels. For data entry, use TextFields or TextAreas. Note that you do not need repaint after a setText on a Label. Putting \n in the label text won’t give you a multiline label. You must use a javax.swing.JLabel. You feed a JLabel HTML (Hypertext Markup Language) containing a <br>. Similarly if you want to decorate your label text.

Learning More

Oracle’s Javadoc on Label class : available:

This page is posted
on the web at:

http://mindprod.com/jgloss/label.html

Optional Replicator mirror
of mindprod.com
on local hard disk J:

J:\mindprod\jgloss\label.html
logo
Please the feedback from other visitors, or your own feedback about the site.
Contact Roedy. Please feel free to link to this page without explicit permission.
Blog
IP:[65.110.21.43]
Your face IP:[54.197.215.146]
You are visitor number