private static void createAndShowGUI() 
    {
        JFrame frame = new JFrame("Robotin Ranka");
    	
        main.setOpaque(true);
        frame.setContentPane(main);

        JButton button = new JButton("jungti");
        main.add(button);
        button.addActionListener(main);
        button.addKeyListener(new KeyListener());
        
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setPreferredSize(frameSize);
        
        //Display the window.
        frame.pack();
        frame.setVisible(true);
    }