Class MultilineLabel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, Scrollable

public class MultilineLabel extends JTextArea
Normal JLabel cannot have multiple lines. If you want to multiple label, you can use this class.
See Also:
  • Constructor Details

    • MultilineLabel

      public MultilineLabel()
    • MultilineLabel

      public MultilineLabel(String s)
  • Method Details

    • updateUI

      public void updateUI()
      Reloads the pluggable UI. The key used to fetch the new interface is getUIClassID(). The type of the UI is TextUI. invalidate is called after setting the UI.
      Overrides:
      updateUI in class JTextComponent
    • adjustUI

      protected void adjustUI()
      Adjusts UI to make sure it looks like a label instead of a text area.
    • getMinimumSize

      public Dimension getMinimumSize()
      Overrides getMinimumSize to return getPreferredSize() instead. We did this because of a bug at http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4824261.
      Overrides:
      getMinimumSize in class JComponent
      Returns:
      new Dimension(1, 1).