Source Code : Disable a character so that no action is invoked.
Java Is Open Source Programming Language You Can Download From Java and Java Libraries From http://www.oracle.com.
Click Here to download
We provide this code related to title for you to solve your developing problem easily. Libraries which is import in this program you can download from http://www.oracle.com.
Click Here or search from google with Libraries Name you get jar file related it
Disable a character so that no action is invoked.
import javax.swing.JComponent;
import javax.swing.JFrame;
import javax.swing.JTextField;
import javax.swing.KeyStroke;
public class Main {
public static void main(String[] argv) {
JTextField component = new JTextField(10);
component.getInputMap(JComponent.WHEN_FOCUSED).put(
KeyStroke.getKeyStroke("typed X"), "none");
JFrame f = new JFrame();
f.add(component);
f.setSize(300, 300);
f.setVisible(true);
}
}
Thank with us