Problems with Popups

Hi,

I'm having problems trying to use Popups. Not as in JPopupMenu, but a custom popup. I'm writing an application which lets you upload photos to Facebook. I want the 'tagging' part to work in pretty much the same way as it does on the Facebook website: you click on the image, a box pops up with a list of your friend's names and you can type into a text box and narrow the list down or scroll through, that kind of thing.

Anyway, it's all working pretty well, except for a rather strange problem: when the popup appears and goes outside of the parent window, you can't enter any text into the JTextField. It's as if it was made read-only. You can still click on the JList items and select friends though, which seems strange?! It's just as if the text field can't gain focus when the popup panel goes outside of the frame - when it's inside the frame, there aren't any problems.

The code works like this: I've created a class called AbstractPopup (which borrows quite heavily from JPopupMenu) - you can see it here:

http://fb-photo-uploader.googlecode.com/svn/trunk/src/main/java/uk/me/phillsacre/uploader/gui/utils/AbstractPopup.java

This is the bit that creates the javax.swing.Popup:

private Popup getPopup()

{

if (null != _popup)

{

_popup.hide();

_popup =null;

}

PopupFactory popupFactory = PopupFactory.getSharedInstance();

Popup popup = popupFactory.getPopup(getInvoker(), this, _desiredX,

_desiredY);

popup.show();

return popup;

}

So... anyone have any bright ideas? :-)

[1884 byte] By [phill.sa] at [2007-11-27 8:51:19]
# 1
ok, I just managed to find this bug report: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4909116Apparently it's "not a bug, it's a feature" :-S
phill.sa at 2007-7-12 21:04:20 > top of Java-index,Desktop,Core GUI APIs...