Asked By
olivia.bha
70 points
N/A
Posted on - 02/07/2013
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..
What is the java code for on screen keyboard?
Â
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))
 }
Â
}