0

hey guys,
i am trying to create a simple menu using canvas
for example

class Name extends Canvas{
          MenuItem menuitem;

          public Name(){
                    

                 JPanel panel = (JPanel) container.getContentPane();
		panel.setPreferredSize(new Dimension(800,620));
		panel.setLayout(null);
		setBounds(0,0,900,600);
		panel.add(this);

               setLocation( 0, 20 );
               MenuBar menuBar = new MenuBar( );
               Menu menuFarm = new Menu( "About" );
               menuitem.addActionListener(this);
}

i tried adding "implements ActionListener()" but it dosn't work it keeps on giving me compiler errors.
could somebody show me an example how to create a simple menu bar please

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by Ezzaral
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.