After implementing the Observer/Observable pattern, I can't really see why the Frame isn't showing when the code is executed.

I've looked over it a million times but can't figure it out.

I just want to know where I've gone wrong and how I can fix, so that the frame is showing.

Apologies for the code dump. Would be very grateful for the assistance.

```
    public class MainGameFrame extends JFrame implements KeyListener,Observer {

        private final JLabel lblPythonChallenge = DefaultComponentFactory
        .getInstance().createTitle("Code Wars");
        protected JTextArea textAreaEditable;
        protected JTextArea textAreaQuestion;
        protected JTextArea textAreaResult;
        protected JTextArea textAreaScore;
        protected PrintWriter output; // to write textArea stuff to file
        private JTextArea textAreaPreview;
        private JLabel lblPreview;

        private ServerToClient model;
        private Socket sock;

        /**
        * Create the application.
        */
        public MainGameFrame() {

    Thread t1 = new Thread(new Runnable() {

        @Override
        public void run() {
            try {

                sock = new Socket("127.0.0.1", 6789);
                model = new ServerToClient(sock);

            } catch (UnknownHostException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }

        }

    });
    initialize();
    setVisible(true);

     }

        /**
        * Initialize the contents of the frame.
        */
        private void initialize() {
            model.addObserver(this);

            getContentPane().setBackground(new Color(153, 204, 102));
            setForeground(Color.GREEN);
            setBackground(Color.GREEN);
            setTitle("Code Wars");
            setBounds(100, 100, 762, 511);
            setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            getContentPane().setLayout(null);

            // TextArea 1
            textAreaEditable = new JTextArea();
            textAreaEditable.setBounds(10, 117, 353, 130);
            getContentPane().add(textAreaEditable);
            textAreaEditable.setTabSize(2); // fix tab size
            // auto-indentation
            textAreaEditable.registerKeyboardAction(new IndentNextLine(),
            KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0),
            JComponent.WHEN_FOCUSED);

            // add KeyListener
            textAreaEditable.addKeyListener(this);

            // TextArea 2
            textAreaQuestion = new JTextArea();
            textAreaQuestion.setBackground(new Color(255, 255, 255));
            textAreaQuestion.setBounds(10, 34, 353, 46);
            getContentPane().add(textAreaQuestion);

            // TextArea 3
            textAreaResult = new JTextArea();
            textAreaResult.setBounds(10, 357, 713, 104);
            getContentPane().add(textAreaResult);

            textAreaResult.setEditable(false);

            // JTextPane textPane_1 = new JTextPane();
            // textPane_1.setBounds(463, 158, 273, 269);
            // frmPythonChallenge.getContentPane().add(textPane_1);

            // component 4
            JButton btnRunCode = new JButton("Run Code");
            btnRunCode.setBounds(10, 258, 330, 31);
            getContentPane().add(btnRunCode);
            btnRunCode.addActionListener(new RunButtonListener());

            // TextArea 4
            textAreaScore = new JTextArea();
            textAreaScore.setBounds(373, 34, 350, 46);
            getContentPane().add(textAreaScore);
            lblPythonChallenge.setBounds(23, -31, 143, 31);
            getContentPane().add(lblPythonChallenge);

            JLabel lblEnterCodeIn = DefaultComponentFactory.getInstance()
            .createLabel("Enter code in the box below:");
            lblEnterCodeIn.setForeground(new Color(0, 100, 0));
            lblEnterCodeIn.setFont(new Font("Tahoma", Font.BOLD, 12));
            lblEnterCodeIn.setBounds(10, 91, 209, 15);
            getContentPane().add(lblEnterCodeIn);

            JLabel lblQuestion = DefaultComponentFactory.getInstance().createLabel(
            "Question:");
            lblQuestion.setForeground(new Color(0, 100, 0));
            lblQuestion.setFont(new Font("Tahoma", Font.BOLD, 12));
            lblQuestion.setBounds(10, 9, 92, 14);
            getContentPane().add(lblQuestion);

            JLabel lblScores = DefaultComponentFactory.getInstance().createLabel(
            "Scores:");
            lblScores.setForeground(new Color(0, 100, 0));
            lblScores.setFont(new Font("Tahoma", Font.BOLD, 12));
            lblScores.setBounds(373, 9, 92, 14);
            getContentPane().add(lblScores);

            JLabel lblThisIsThe = DefaultComponentFactory.getInstance()
            .createLabel("This is the result from your code!");
            lblThisIsThe.setForeground(new Color(0, 100, 0));
            lblThisIsThe.setFont(new Font("Tahoma", Font.BOLD, 12));
            lblThisIsThe.setBounds(10, 328, 238, 15);
            getContentPane().add(lblThisIsThe);

            // TextArea 5
            textAreaPreview = new JTextArea();
            textAreaPreview.setBounds(373, 117, 350, 130);
            textAreaPreview.setTabSize(2);
            textAreaPreview.setEditable(false);
            getContentPane().add(textAreaPreview);

            lblPreview = DefaultComponentFactory.getInstance().createLabel(
            "Preview");
            lblPreview.setForeground(new Color(0, 128, 0));
            lblPreview.setFont(new Font("Tahoma", Font.BOLD, 12));
            lblPreview.setLabelFor(lblPreview);
            lblPreview.setBounds(373, 84, 200, 31);
            getContentPane().add(lblPreview);

        }

        /**
        * Launch the application.
        */
        public static void main(String[] args) {
            EventQueue.invokeLater(new Runnable() {
                public void run() {
                    try {
                        MainGameFrame window = new MainGameFrame();
                    } catch (Exception e) {
                        e.printStackTrace();
                    }
                }
            });

        }
    }

```