Index
Name

PLabel

Examples
PContainer container;
PImageLabel imglabel;
PLabel label;

void setup() {
  container = new PContainer();
  
  PImage img = loadImage("mobile.png");
  imglabel = new PImageLabel(img);
  imglabel.setBounds((width - img.width) / 2, 
                     (height - img.height) / 2,
                     img.width,
                     img.height);  
  container.add(imglabel);
  
  int y = imglabel.y + imglabel.height;  
  label = new PLabel("Text Label");
  label.align = CENTER;
  label.setBounds(0, y, width, height - y);
  container.add(label);
}

void draw() {
  background(255);
  container.draw();
}

Description A text label component. This component can automatically size itself to fit the text specified.
Fields
font   The font used to display the text

fontColor   The color of the text

leading   If multiple lines, the leading of the text

align   The horizontal alignment of the text

text   The text to display, if a single line

lines   An array of lines of text to display

Constructors
PLabel(text)
Parameters
label   the text to display

Related PComponent