I want to make a perfect integer dialog on Java, where you cannot type letters, only numbers
Here is my code:
public class PMain {
public static void main(String args[]) {
String a = JOptionPane.showInputDialog("Type the number for 'A'");
int A = Integer.parseInt(a.trim());
String b = JOptionPane.showInputDialog("Type the number for 'B'");
int B = Integer.parseInt(b.trim());
}
}