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

I'd recommend starting with How To Use Menus in the Swing tutorial.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.