I'm trying to show a user JOptionPane where they enter x and y coordinates each in their own textfield, but I don't know how to store user input as ints.
So I need to do something like:
int xCorFromUser = xCor;
int yCorFromUser = yCor;
I have this code so far:
JTextField xCor = new JTextField();
JTextField yCor = new JTextField();
Object[] fields = {"Enter X Coordinate:", xCor, "Enter Y Coordinate:", yCor};
JOptionPane.showConfirmDialog(null, fields, "Move Shape", JOptionPane.WARNING_MESSAGE);