Today I updated my jdk and docs from 7 to 8. I made a few changes to my program, and now when I try to use the JOptionPane, JLabel, ... program, everything will go wrong. I made a separate class of testers whose sole purpose is to run one JOptionPane block, and an error still occurred. Below is an image of what the dialog looks like. Is something seriously wrong with Java 8?
import javax.swing.JOptionPane;
public class CirclePointTester
{
public static void main(String [] args)
{
String input = JOptionPane.showInputDialog("Enter the x coordinate of the circle");
int xc = Integer.parseInt(input);
String input2 = JOptionPane.showInputDialog("Enter the y coordinate of the circle");
int yc = Integer.parseInt(input2);
String input3 = JOptionPane.showInputDialog("Enter the height value of the circle");
int height = Integer.parseInt(input3);
String input4 = JOptionPane.showInputDialog("Enter the width value of the circle");
int width = Integer.parseInt(input4);
}
}


source
share