title: How to attach new JFrame to an already made frame?
body: <p>How do I connect a frame to an existing frame?</p>
  <p>The code below is the code for the appletframe.  What I want to do is add the other code which is for the frame to be connected to the bottom of the AppletFrame, so that when I drag the Appletframe the frame code with we dragged with it as well. Basically I want the frame code to be attached with the appletFrame so that both the frames are together.</p>
  <h2>AppletFrame</h2>
  <pre><code>    appletFrame = new JFrame(Settings.serverName);
              Loader.webclient = false;
              appletFrame.setLayout(new BorderLayout());
              appletFrame.setDefaultCloseOperation(3);
              appletPanel.setLayout(new BorderLayout());
              appletFrame.setIconImage(Toolkit.getDefaultToolkit().getImage(this.getClass().getResource(&quot;/resources/icon.png&quot;)));
              appletPanel.add(this);
              appletPanel.setPreferredSize(new Dimension(767, 537));
              appletFrame.getContentPane().add(appletPanel, &quot;Center&quot;);
              appletFrame.pack();
              appletFrame.setLocationRelativeTo(null);
              appletFrame.setVisible(true);
      JMenuBar jmenubar = new JMenuBar();
              appletFrame.setJMenuBar(jmenubar);
              Layout = new FlowLayout();
              ImageIcon keyboard = new ImageIcon(Toolkit.getDefaultToolkit().getImage(this.getClass().getResource(&quot;/resources/keyboard.png&quot;)));
              ImageIcon wrench = new ImageIcon(Toolkit.getDefaultToolkit().getImage(this.getClass().getResource(&quot;/resources/wrench.png&quot;)));
              Button1 = new JButton(&quot;Vote&quot;);
              Button2 = new JButton(&quot;Item List&quot;);
              Button3 = new JButton(&quot;Screenshot&quot;);
              Button4 = new JButton(wrench);
              Button5 = new JButton(keyboard);
              Button4.setBorder(null);
              Button4.setBorderPainted(false);
              Button4.setContentAreaFilled(false);
              Button5.setBorder(null);
              Button5.setBorderPainted(false);
              Button5.setContentAreaFilled(false);
              jmenubar.setLayout(Layout);
              jmenubar.add(Button1);
              jmenubar.add(Button2);
              jmenubar.add(Button3);
              jmenubar.add(Button4);
              jmenubar.add(Button5);
              Button1.addActionListener(this);
              Button2.addActionListener(this);
              Button3.addActionListener(this);
              Button4.addActionListener(this);
              Button5.addActionListener(this);
              Button1.setText(&quot;Vote&quot;);
              Button2.setText(&quot;Item List&quot;);
              Button3.setText(&quot;Screenshot&quot;);
  </code></pre>
  <p>Frame which I want it to be attached with the AppletFrame. I want this to be attached to the bottom of the appletFrame, but I don't know how to do it.</p>
  <pre><code>JFrame frame = new JFrame(); 
          frame.setSize(775,121); 
          frame.setResizable(false); 
          JTextArea textArea = new JTextArea(&quot;TEST&quot;); 
          textArea.setSize(400,400);          
          textArea.setLineWrap(true);     
          textArea.setEditable(false);    
          textArea.setVisible(true);     
          JScrollPane scroll = new JScrollPane (textArea);    
          scroll.setVerticalScrollBarPolicy   (JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);          
          scroll.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);     
          frame.add(scroll);    
          frame.setVisible(true);     
          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  </code></pre>