aspose file tools*
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 Java 8 in Action this week in the Java 8 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!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: TextFields in Popup not working
 
Similar Threads
JButton in JPanel
Rolling Scrollbar to JScrollPane's top
Popup Problem
JFrame
How do you use javax.swing.Popup?