title: add icon and text in JMenu in swing
body: <p>I am working on swings. I have to create a mainscreen consisting 10 menus. 
  I have created the form by JFrame and menu by JMenu. Now that menu should contain text and image both and action performed method should be called on clicking of the menu so that action could be performed on clicking of the menu button.</p>
  
  <p>Right now I'm making Jmenu with JMenuItem and icon on image icon but I want the menu with icon and text </p>
  
  <p>my current code is </p>
  
  <pre><code>public class MenuScreen  extends JFrame implements ActionListener{
  
               Container cp;
               JMenuBar menuBar;
  
               JLabel logo;
                  public MenuScreen() {
                      super("");
                      cp=this.getContentPane();
                      cp.setBackground(Color.gray);
  
                      menuBar= new JMenuBar();
          logo=new JLabel(im);
                  cp.add(logo);
                      logo.setBounds(100,80,500,350);
  
              helpmenu= new JMenu(" Help  ");
          homemenu=new JMenu(" Home  ");
          fieldsmenu= new JMenu(" Fields  ");
          backmenu= new JMenu(" Back  ");
          forwardmenu= new JMenu(" Forward  ");
          panelmenu= new JMenu(" Panel  ");
          searchmenu= new JMenu(" Search  ");
          quickmenu= new JMenu(" Quick  ");
          infomenu= new JMenu(" Info  ");
          exitmenu= new JMenu(" Exit  ");
          mastermenu= new JMenu(" Master  ");
          tarrifmenu= new JMenu(" Tarrif  "); 
          contactmenu= new JMenu(" Contact  ");
          webmenu= new JMenu(" Web  ");
          wordmenu= new JMenu(" Word  ");
          legaldictionarymenu= new JMenu(" LegalDictionary  ");
          budgetmenu=new JMenu(" Budget 2012 2013  ");
          memberdetailmenu= new JMenu(" Member Details  ");
  
  
          Font f1= new Font("Arial",Font.BOLD,16);
  
          budgetmenu.setFont(f1);
          legaldictionarymenu.setFont(f1);
          helpmenu.setFont(f1);
  
          JMenuItem backmenuitem= new JMenuItem(backicon);
          backmenu.add(backmenuitem);
  
  
          JMenuItem exitmenuitem= new JMenuItem(exiticon);
          exitmenu.add(exitmenuitem);
  
          menuBar.add(helpmenu);
          menuBar.add(homemenu);
          menuBar.add(fieldsmenu);
          menuBar.add(backmenu);
          menuBar.add(forwardmenu);
          menuBar.add(panelmenu);
          menuBar.add(searchmenu);
          menuBar.add(quickmenu);
          menuBar.add(infomenu);
          menuBar.add(exitmenu);
          menuBar.add(mastermenu);
          menuBar.add(tarrifmenu);
          menuBar.add(contactmenu);
          menuBar.add(webmenu);
          menuBar.add(wordmenu);
          menuBar.add(legaldictionarymenu);
          menuBar.add(budgetmenu);
          menuBar.add(memberdetailmenu);
  
          setJMenuBar(menuBar);
  
      /*
       Adding Listeners to the menus where required 
  
       */
              searchmenu.addActionListener(this);
  
      }
  
      public void actionPerformed(ActionEvent ae)
      {
       JOptionPane.showMessageDialog(null,"clicked");
            if(ae.getActionCommand().equals("Search"))
            {
  
             SearchForm frm=new SearchForm();
          Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
            frm.setBounds(0,0,screenSize.width, screenSize.height);
            frm.setVisible(true);
  
  
            }           
  
      }
  
     public static void main(String args[])
  {
  
         MenuScreen frm= new MenuScreen();
  
         Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
         frm.setBounds(0,0,screenSize.width, screenSize.height);
         frm.setVisible(true);
  }
  }
  </code></pre>
  
  <p>please help me.</p>