Quantcast
Channel: Library Questions - Processing 2.x and 3.x Forum
Viewing all articles
Browse latest Browse all 2896

How I Can turn the local variable to global?

$
0
0
import g4p_controls.*;
GTextArea txa;
GButton show;

void setup(){
 size(700,700);
 background(0,0,255);
 show=new GButton(this,20,20,50,60,"Show");
 txa=4new GTextArea(this, width/2-100, height/2-80, 200, 160);
 txa.tag = "Raz";
 txa.setPromptText("Text area 1);

}
public void handleButtonEvents(GButton button,GEvent event){
 if(event == GEvent.CLICKED){
  String[] lines =   txa.getTextAsArray();
}

How can I make lines[] to global String?


Viewing all articles
Browse latest Browse all 2896

Trending Articles