@@ -0,0 +1,2198 @@
+package test;%0A%0Aimport javax.swing.*; %0Aimport java.awt.*;%0Aimport java.awt.event.ActionEvent;%0Aimport java.awt.event.ActionListener;%0Aimport java.awt.event.KeyEvent;%0A %0Apublic class InputPanel extends JPanel implements ActionListener%0A%7B%0A    protected JButton button;%0A    protected JButton button2;%0A    protected static String input;%0A    protected static boolean isDone;%0A    protected JTextField text;%0A    protected JLabel label;%0A %0A    public InputPanel(String s)%0A    %7B%0A        text = new JTextField(10);%0A        %0A        label = new JLabel(s);%0A%0A        button = new JButton(%22Enter%22);%0A        button.addActionListener(this);%0A        button.setActionCommand(%22enter%22);%0A %0A        Panel panel1 = new Panel(new FlowLayout());%0A        panel1.add(label);%0A        panel1.add(text);%0A        panel1.add(button);%0A        %0A        button2 = new JButton(%22Cancel%22);%0A        button2.addActionListener(this);%0A        button2.setActionCommand(%22cancel%22);%0A        %0A        setLayout(new BorderLayout());%0A        add(panel1, BorderLayout.NORTH);%0A        add(button2, BorderLayout.CENTER);%0A        %0A        isDone = false;%0A    %7D%0A    %0A    public void actionPerformed(ActionEvent e)%0A    %7B%0A        if (e.getActionCommand().equals(%22enter%22))%0A        %7B%0A            input = text.getText();%0A            isDone = true;%0A        %7D%0A        else%0A        %7B%0A            input = %22%22;%0A            isDone = true;%0A        %7D%0A    %7D%0A %0A    public static String createAndShowGUI(String s)%0A    %7B%0A        JFrame frame = new JFrame(%22Cage Panel%22);%0A        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);%0A %0A        InputPanel newContentPane = new InputPanel(s);%0A        newContentPane.setOpaque(true);%0A        frame.setContentPane(newContentPane);%0A %0A        %0A        frame.setVisible(true);%0A        frame.pack();%0A        frame.setLocationRelativeTo(null); %0A%0A        while (isDone == false)%0A        %7B%0A            try%0A            %7B%0A                Thread.sleep(100);%0A            %7D%0A            catch (InterruptedException e)%0A            %7B%0A                %0A            %7D%0A        %7D%0A        frame.setVisible(false);%0A        frame.dispose();       %0A        %0A        return input;      %0A    %7D%0A %0A    public static void main(String%5B%5D args)%0A    %7B%0A     %0A    %7D%0A%7D%0A

Create InputPanel.java