Results 1 to 3 of 3

Thread: drop down menu

  1. #1
    mike eriksen is offline Member
    Join Date
    May 2008
    Posts
    1
    Rep Power
    0

    Default drop down menu

    i am looking for a way to use a drop down menu for my spider solitaire game
    so far i can get it to run in another window but cant get the menu to run in the program

  2. #2
    hardwired's Avatar
    hardwired is offline Senior Member
    Join Date
    Jul 2007
    Posts
    1,576
    Rep Power
    9

  3. #3
    serjant's Avatar
    serjant is offline Senior Member
    Join Date
    Jun 2008
    Location
    Ukraine,Zaporozhye
    Posts
    487
    Rep Power
    7

    Default

    Java Code:
    toolMenu.addMouseMotionListener(new MouseAdapter(){
    			public void mouseMoved(MouseEvent e){
    				toolMenu.setPopupMenuVisible(true);
    				toolMenu.setEnabled(true);
    				fileMenu.setPopupMenuVisible(false);
    				editMenu.setPopupMenuVisible(false);
    				
    			}
    			
    		});
    For each menu write MouseMotionListener,and when the mouse moved on specific menu make setPopupMenu(true) for the menu you move the mouse,and for others is false.

Similar Threads

  1. Replies: 7
    Last Post: 05-09-2008, 08:54 AM
  2. How to use a drop-down box in Struts
    By piterskiy74 in forum Web Frameworks
    Replies: 1
    Last Post: 02-13-2008, 12:42 PM
  3. Drop down menu
    By BenNeiderlander in forum New To Java
    Replies: 3
    Last Post: 02-05-2008, 08:35 AM
  4. Replies: 3
    Last Post: 12-16-2007, 12:19 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •