Results 1 to 4 of 4
  1. #1
    carderne is offline Senior Member
    Join Date
    Nov 2007
    Posts
    160
    Rep Power
    7

    Default Java popup irritation

    I have a JPopupMenu that I created and then displayed using setLocation and setVisible. However, I just upgraded to the latest version of the JRE and now a popup menu appears, but it doesn't work and doesn't disappear when I click away...

    I changed the code to use the show method to display the popup and now it works, but now the focus handling isn't so good. i.e. Now if I want to leave the popup and click on a button somewhere else, I have to click twice: once to remove focus from the popup and again to actually click the button...

    What is happening? Have they stuffed something up or have I?

    And I tried on two computers, so the problem was definitely created by the change to the latest version of Java (6, update 16).

  2. #2
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    8

    Default

    Difficult to say without seeing what your code looked like.

  3. #3
    carderne is offline Senior Member
    Join Date
    Nov 2007
    Posts
    160
    Rep Power
    7

    Default

    Ok right. Here's a simplified example of what I'm trying to do:

    Java Code:
    JList myList = new JList;
    JPopupMenu popup = new JPopupMenu();
    popup.add("a menu item");
    
    popup.show(myList, myXCoordinate, myYCoordinate);
    Is that enough detail?

  4. #4
    carderne is offline Senior Member
    Join Date
    Nov 2007
    Posts
    160
    Rep Power
    7

    Default

    Anyone have the same problem? Try making a JPopupMenu and then displaying it using setVisible. Make sure you have the latest JDK and JRE installed.

Similar Threads

  1. Help needed for using popup in Java
    By uhdam in forum AWT / Swing
    Replies: 2
    Last Post: 03-28-2009, 09:16 PM
  2. java.swing.popup not hiding
    By pinks_70986 in forum AWT / Swing
    Replies: 1
    Last Post: 02-11-2009, 08:35 PM
  3. ArrayList irritation
    By gnarly hogie in forum New To Java
    Replies: 16
    Last Post: 12-16-2008, 06:57 PM
  4. how we get popup window in java
    By baserohit in forum Advanced Java
    Replies: 1
    Last Post: 03-22-2008, 04:39 AM
  5. Popup in Java
    By fernando in forum New To Java
    Replies: 1
    Last Post: 08-07-2007, 06:55 AM

Tags for this Thread

Posting Permissions

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