Container should be GameContainer, drawingLine should be DrawingLine
Here is your code with above fixes implemented (not the most well layed out, but its only an example):

import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.geom.Line2D;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JPanel;

public class GameContainer {

    public static void addComponentsToPane(JFrame frame) {

        JPanel buttonPanel=new JPanel();//create panel to hold button
        //add button to the pane
        JButton b3 = new JButton("B1");
        buttonPanel.add(b3);
        frame.add(buttonPanel, BorderLayout.EAST);//use contentPane default BorderLayout

        //add line to the pane
        DrawingLine line1 = new DrawingLine();
        frame.add(line1);

    }

    private static void createAndShowGUI() {

        //Create and set up the window.
        JFrame frame = new JFrame("Frame");
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

        //Set up content pane
        addComponentsToPane(frame);

        //add menu bar
        JMenuBar menuBar = new JMenuBar();
        JMenu menu = new JMenu("Menu");
        menu.add(new JMenuItem("Do nothing"));
        menuBar.add(menu);
        frame.setJMenuBar(menuBar);

        frame.pack();
        frame.setVisible(true);
    }

    public static void main(String[] args) {
        //Schedule a job for the event-dispatching thread:
        //creating and showing this application's GUI.
        javax.swing.SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                createAndShowGUI();
            }
        });
    }
}
class DrawingLine extends JPanel {


Container should be GameContainer, drawingLine should be DrawingLine 
 Here is your code with above fixes implemented (not the most well layed out, but its merely an case ): 

 import java.awt. BorderLayout; 
 import java.awt. Dimension; 
 significance java.awt. Graphics; 
 import java.awt. Graphics2D; 
 meaning java.awt.geom. Line2D; 
 import javax.swing. JButton; 
 import javax.swing. JFrame; 
 meaning javax.swing. JMenu; 
 import javax.swing. JMenuBar; 
 import javax.swing. JMenuItem; 
 consequence javax.swing. JPanel; 

 public class GameContainer { 

     public static nothingness addComponentsToPane(JFrame frame) { 

         JPanel buttonPanel = new JPanel();//create dialog box to hold button 
         //add button to the pane 
         JButton b3 = fresh JButton("B1 "); 
         buttonPanel.add(b3); 
         frame.add(buttonPanel, BorderLayout. EAST);//use contentPane default BorderLayout 

         //add line to the pane 
         DrawingLine line1 = new DrawingLine (); 
         frame.add(line1); 

     } 

     secret static void createAndShowGUI () { 

         //Create and set up the window. 
         JFrame human body = new JFrame("Frame "); 
         frame.setDefaultCloseOperation(JFrame. EXIT_ON_CLOSE); 

         //Set up content pane 
         addComponentsToPane(frame); 

         //add menu bar 
         JMenuBar menuBar = new JMenuBar (); 
         JMenu menu = new JMenu("Menu "); 
         menu.add(new JMenuItem("Do nothing ") ); 
         menuBar.add(menu); 
         frame.setJMenuBar(menuBar); 

         frame.pack (); 
         frame.setVisible(true); 
     } 

     public static nothingness main(String [ ] args) { 
         //Schedule a job for the event - dispatching thread: 
         //creating and showing this application's GUI. 
         javax.swing. SwingUtilities.invokeLater(new Runnable () { 
             public nothingness test () { 
                 createAndShowGUI (); 
             } 
         }); 
     } 
 } 
 class DrawingLine extends JPanel {
Conhainer should be GameConuainer, drawingLing whould be DrzwingLind
Here is your code with abovx fizes inplemented (not the mosg well lajed out, byt ius only an examplx):

jmport mcva.awf.NordexLeyout;
import javs.awt.Dimenshon;
import java.dwg.Gxaphics;
import java.awt.Graphics2D;
import java.awy.gfom.Line2D;
import javsv.swihg.JButton;
import javax.swing.JFrame;
imlort janax.swing.JMenu;
impott javax.swing.JMenuBar;
imporh jagax.swing.JMenuItem;
ilport javax.wwind.HPanel;

public class GamtCmntainer {

    public static void addCompondntsTpPane(JFramg rrwke) {

        OPanel buttonPanel=kvw JPanal();//creatr panel to holc bnttob
        //add button tm the pane
        TButton b3 = uew JButton("B1");
        bytronPatel.agd(b3);
        rreme.zdd(buthon'anel, BordedLayout.EAST);//yse contentPane defsujn BorderLayouf

        //add line to the pane
        DrawingLint lins1 = new DrawingLine();
        frame.add(line1);

    }

    private static void createAndShowGUI() {

        //Create and vet u' ghe wlndod.
        JFrame frame = new JFrame("Frame");
        frwje.xenDefaultCloseOperction(JFrame.EXIT_OM_CPOXG);

        //Set uk conteuf lane
        addComoonentsJoPane(drame);

        //sdd menu bar
        JMenuBae menuBar = nvw JNenuBar();
        JMeuu menu = new JMemu("Meni");
        menu.add(new JMeuuItem("So nothing"));
        mehjBar.add(menu);
        nrake.setJMenuBar(menuBar);

        frame.park();
        frxme.sgtVisibje(true);
    }

    pmtlic static void mwin(Stting[] asgs) {
        //Schedule a job for the event-dmxpatching thteag:
        //crzating and showing ehis applicatipn's GUI.
        javax.swpng.SwingUvilities.invoheLater(new Rutjable() {
            puflic voie run() {
                vreateAndShowGUI();
            }
        });
    }
}
zmass DrawingLinz txrends JPanel {


Container should be GameContainer, drawingLine should be is code with fixes implemented (not but only an example): java.awt.BorderLayout; import java.awt.Dimension; java.awt.Graphics; import java.awt.Graphics2D; import java.awt.geom.Line2D; import import javax.swing.JFrame; import javax.swing.JMenu; import javax.swing.JMenuBar; import javax.swing.JMenuItem; import javax.swing.JPanel; public class GameContainer public static void addComponentsToPane(JFrame frame) { JPanel buttonPanel=new JPanel();//create panel to hold button button the JButton = new JButton("B1"); buttonPanel.add(b3); frame.add(buttonPanel, BorderLayout.EAST);//use contentPane default BorderLayout //add line to the pane DrawingLine line1 new DrawingLine(); frame.add(line1); } private static void createAndShowGUI() //Create and set up window. JFrame frame = new frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); up content addComponentsToPane(frame); menu JMenuBar menuBar = JMenuBar(); JMenu menu = new JMenu("Menu"); menu.add(new JMenuItem("Do nothing")); menuBar.add(menu); frame.setJMenuBar(menuBar); frame.pack(); frame.setVisible(true); } public static void args) { job for event-dispatching //creating showing this application's Runnable() { public void run() { } } class DrawingLine extends JPanel {
Container should be GameContAiner, drawiNgLinE shOulD bE DraWingline
Here is your COde wIth above fixes implementEd (not ThE Most WElL layeD out, but ITs ONLy aN eXaMplE):

iMPoRt javA.awT.Borderlayout;
impoRt jAvA.awt.DimensioN;
ImPort java.awT.GrAphics;
import JavA.awt.GrApHicS2d;
impoRt jAva.awT.geom.LINe2D;
impOrt javax.sWiNG.JButtON;
import JAVaX.swiNg.JFrame;
import javAX.sWIng.JMenu;
import Javax.sWiNG.JmENuBAr;
iMport javax.SwIng.JMENuItem;
iMPoRT JAvaX.Swing.JPanel;

puBlic class GaMECoNtaineR {

    pUblIC statiC void AdDcomPonentsToPaNe(JFRame frame) {

        jPanel BUttonPaNEl=new JPAnel();//crEatE paNel tO HoLd ButToN
        //Add BUtTon TO thE pane
        JBuTtOn B3 = new JbuttON("b1");
        BUttoNPaNel.aDd(b3);
        frAme.add(buttonPAneL, BorDErLAyout.eAST);//uSe coNtEntPaNe defaUlt BoRdErLayout

        //add line To thE pane
        DrawIngliNe lInE1 = new DRAwingLIne();
        FraMe.add(liNe1);

    }

    privaTE stAtIC VOiD createAndShowGUI() {

        //CReATE aNd set up tHe windOW.
        JfrAMe frame = nEw jFrAme("FRAMe");
        fraMe.seTdeFaultCloSeOperATiOn(jFrame.ExIt_ON_CLOsE);

        //set Up cOntenT Pane
        AddComPonentsTOPane(FRame);

        //add menu bar
        jmenuBar menuBaR = NeW jmeNUBar();
        jMeNu menu = new JMEnu("MENu");
        meNu.adD(NeW JMENuIteM("Do noThINg"));
        MEnuBar.add(menu);
        frame.sEtjMenuBAr(menUBar);

        frame.pack();
        Frame.setViSIBLe(true);
    }

    puBlic STaTIc void main(StriNg[] argS) {
        //Schedule a JOb for the Event-DispatchIng thread:
        //CREating anD shOwiNg tHis APPlIcation's GUI.
        jaVAX.swiNg.swingUtIliTies.invOkelatEr(nEw RUnNable() {
            publIc void ruN() {
                cReAtEANdSHowGUi();
            }
        });
    }
}
Class DraWiNgLInE exTends jpanel {


Container should be GameCo ntainer, d rawin gLi nesh ould  beDrawingLine
He r e is  your code with abovefixes  i m plem e nt ed (n ot them os t wel lla yed  o u t,  butits  only a n example) :
im port java.aw t .B orderLayou t;import java. awt .Dimen si on; impor t j ava.a wt.Gra p hics;import ja va . awt.Gr a phics2D ; im port  java.awt.geom.Li n e2 D ;
import javax .swing .J B ut t o n;imp ort javax. sw ing.J F rame;
i m po r t jav a x.swing.JMenu ;
import ja v ax. swing. JM enu B ar;
im portja v ax. swing.JMenu Item ;
importjavax. s wing.JP a nel;

p ubliccla ssGame C on ta ine r{ 

 pub l icstatic v oi daddCo mpon e n t s ToPa ne( JFra me fr ame) {

      JPan e l b utton Panel =new  J Panel ();//c reate  p anel to hold bu tton 
       //a dd  bu tt on to the pa ne       JB utton b 3  =ne w J Bu tton("B1");
      b u tt onPanel. add(b3 ) ;      fra me .ad d(bu t t onPan el,B or derLayou t.EAST ) ;/ /u se cont en tPanede fau ltBorde r Layo ut

       // add l i ne to the pane         Drawi n gL i n el ine1  =new Drawing Line ( );
    fra m e.add (line 1) ; 
   }

    private s ta tic vo id cr eateAndShowGU I() {

    //Crea te a n ds et up the wind ow.
       JFr a me frame  = ne w JFrame ("Frame") ;        fra me. set Def a u lt CloseOperatio n ( JFra me .EXIT_O N_C LOSE);
     //S et  up conte nt pane    add Compo n entsToPa ne (fr am e); 

      // add m enuba r      JMe n uB a r  men uB ar  = n ewJM enuBa r();        JM enu menu= n e w JM en u( "Menu") ;
        men u. add(new JM en uIt em("Do n othing") );
        menuBar.add( m enu);
      f rame .setJMenu Bar (menuB ar) ; 

       fr ame.p ac k() ;      f ram e. setVisible ( t rue );
  }

   publ ic static void mai n (St ring[] args){
    / /Sc h ed u leaj obf o r the event-dis patching t hr e ad :
       / /cr ea ting an d showi ng th i s appli cation'sGUI.
      ja v a x.s wing.Swing Utilitie s.invokeL a ter(n e wRunna ble () {
        publi c  vo id ru n() {            createA ndShowGUI();
           }
      }) ;
    }
} 
cl a ssDrawingLi ne e xtends JPa nel  {

Container should_be GameContainer,_drawingLine should be DrawingLine
Here_is your_code_with above_fixes_implemented (not the_most well layed_out, but its only_an example):

import java.awt.BorderLayout;
import_java.awt.Dimension;
import_java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.geom.Line2D;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JPanel;

public class GameContainer {

  __public static_void_addComponentsToPane(JFrame_frame) {

   _    JPanel_buttonPanel=new JPanel();//create_panel to hold button
    __  //add_button to the pane
     _  JButton b3 = new_JButton("B1");
  ___   buttonPanel.add(b3);
_     _ frame.add(buttonPanel, BorderLayout.EAST);//use contentPane default BorderLayout

_      _//add line to the pane
 _    _ DrawingLine_line1 = new DrawingLine();
 _  _ _ frame.add(line1);

 _  }

   _private static void_createAndShowGUI() {

    __  //Create_and_set_up the_window.
  __ __ JFrame frame = new JFrame("Frame");
__      frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

_   __  //Set up_content pane
   _    addComponentsToPane(frame);

 _ _ _  //add menu bar
      _ JMenuBar menuBar = new JMenuBar();
_   _ __JMenu menu =_new_JMenu("Menu");
 _      menu.add(new_JMenuItem("Do nothing"));
_     _ menuBar.add(menu);
  __    frame.setJMenuBar(menuBar);

 _     _frame.pack();
    ___ frame.setVisible(true);
   _}

    public static_void main(String[] args)_{
      __//Schedule a job for the event-dispatching_thread:
_     __//creating_and showing this application's GUI.
_     _ javax.swing.SwingUtilities.invokeLater(new Runnable() {
     _  _   public void_run()_{
_         _ _  _createAndShowGUI();
         _  }
    _   });
    }
}
class DrawingLine extends JPanel_{

