Notice: This is a static archive of the Mobile Processing website, as the project is no longer significantly active. All forms and the Discourse boards are no longer functional, and the mobile website at http://wapmp.at/ is no longer available. Please visit the Mobile Processing Google Group for any remaining discussions and the Processing website for the latest news about Processing.
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