import javax.swing.JOptionPane;
public class Class1 {
public static void main(String args[]) {
int radius = JOptionPane.showInputDialog(null, "Enter the radius");
radius = Math.PI * radius * radius;
JOptionPane.showMessageDialog(null, radius ,"Information", JOptionPane.INFORMATION_MESSAGE);
}
}
I made that in the middle of history, so I don't know if it works. I tried to keep it simple.