I am trying to make a form page in a java applet. Now after making textbox and submit button, how can I validate this text-box? Anyone if can tell me if I can link JS code to applet and if yes, then how?
package com.tcs.applet;
import java.awt.*;
import java.awt.event.*;
import java.applet.*;
import javax.swing.JButton;
public class MyApplet extends Applet {
TextField inputLine = new TextField(15);
private JButton button = new JButton("Submit");
public MyApplet() {
add(inputLine);
add(button);
}
}