01: import javax.swing.JFrame;
02: import javax.swing.JOptionPane;
03: 
04: public class IntersectionViewer
05: {
06:    public static void main(String[] args)
07:    {
08:       JFrame frame = new JFrame();
09: 
10:       final int FRAME_WIDTH = 300;
11:       final int FRAME_HEIGHT = 400;
12: 
13:       frame.setSize(FRAME_WIDTH, FRAME_HEIGHT);
14:       frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
15: 
16:       String input = JOptionPane.showInputDialog("Enter x");
17:       double x = Double.parseDouble(input);
18:       IntersectionComponent component 
19:             = new IntersectionComponent(x);
20:       frame.add(component);
21: 
22:       frame.setVisible(true);
23:    }
24: }