How to read value of variable entered from user input

BabilordBabilord Iran
edited June 2020 in Ganglion

Hi. I am working with Ganglion and java processing. I want to declare a variable and get value of variable from user. in java, i have used to following code:

import java.util.Scanner;
public static void main (String [] args){
    Scanner numb = new Scanner(System.in);
    System.out.print("please enter your number ");
    int n = numb.nextInt();
}

Now, I want that, when focus widget is being selected, before everything, user enter his/her number. how can I do this?

Comments

Sign In or Register to comment.