What is the java code for on screen keyboard?

Asked By 70 points N/A Posted on -
qa-featured

Hello,
Please help me who is master in Java. I need to add user login and password for the user to my new directory. On the password cage I need virtual keyboard. So please let me know java code for on screen keyboard. Appreciate your support..
Thank you..

SHARE
Answered By 0 points N/A #135211

What is the java code for on screen keyboard?

qa-featured

 

Hello Olivia,

I understand your problem in coding. I had done one project in java, where I use virtual keyboard  .

I am providing you all the java codes necessary to make virtual keyboard.

 

  public void actionPerformed(ActionEvent e)

{

 

    // get length of the text in the TextField

 

    String text = field.getText();

 

    // if the text length is 0 exit

 

    if(text.length() == 0)

 

       return;

 

    // reset the JTextField to its old text minus the last character

 

    field.setText(text.subString(text.length() – 1))

  }

 

}

Login/Register to Answer

Related Questions