How do you make InputBoxes in Java??

i tried:

class A{
public static void main(String[] args){
double F = JOptionPane.showInputBox("Input");
}}

Doesn't work...

help.