Meaningless Drivel is fun!*
The moose likes Swing / AWT / SWT and the fly likes TextFields in Popup not working Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "TextFields in Popup not working" Watch "TextFields in Popup not working" New topic
Author

TextFields in Popup not working

Darren Brooks
Ranch Hand

Joined: Dec 29, 2005
Posts: 31
I have a popup created with the popupfactory. I have added a JPanel as the popup's component. This JPanel is outfitted like any other JPanel might be, but I'm not sure why only the JTextFields added to the JPanel, although enabled, are not focusable (i.e. I cannot click and type inside them).

It's as if these components are literally just painted on. What's the deal?
Darren Brooks
Ranch Hand

Joined: Dec 29, 2005
Posts: 31
here i am replying to my own message...

I just went ahead and used a JFrame instead of the JDialog. I set the frame to be undecorated, and now it looks the same as the JDialog. However, I'd appreciate any thoughts about the popup jtextfield problem.

thanks!
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
just a possibility - does the dialog have a parent?

would be better if you could post the code that demonstrates the problem.
Darren Brooks
Ranch Hand

Joined: Dec 29, 2005
Posts: 31
thanks for your initial reply -- yes, the JDialog was set with the underlying frame as its owner. In any case, I'm sorry I didn't save the offending code, as I decided upon another route.

thanks!
 
wood burning stoves
 
subject: TextFields in Popup not working
 
Similar Threads
Popup Problem
How do you use javax.swing.Popup?
Rolling Scrollbar to JScrollPane's top
JFrame
JButton in JPanel