. i am creating simple question asking system in java. so wrote Scanner class How to Call inside the TextArea using Java. what tried so far i attached below. when the form is loaded question should display on the textarea.
public piz() {
initComponents();
ques();
txtarea.setText(ques());
}
public void ques()
{
Scanner in = new Scanner(System.in);
System.out.println("Enter customer name: ");
String name = in.nextLine();
}