What is "jlabel"
An object JLabel
can display text, an image or both. You can specify where in the component display area the content will be aligned by setting the vertical and horizontal alignment. By default, the JLabels
are centered vertically in the display area. When text-only, it has justified alignment by default; when image-only displays, it is centered horizontally, by default.
Unlike the JTextFields
and many other controls, JLabels
are transparent by default: parent content is visible in places not covered by text and icon and background color setting has no effect. JLabel
may be rendered opaque by the method setOpaque(true)
.
References: