Link to home
Start Free TrialLog in
Avatar of hipal
hipalFlag for United States of America

asked on

pop up textfield/area in java swing

when I am using JTextField or JTextArea .. I am albe to add them in my panel.

But I want them to appear as pop up or may be there is some other component which can act as popup text field ?

Please suggest.
Avatar of ksivananth
ksivananth
Flag of United States of America image

you may want to add them into a JWindow and show/hide as popup!
Avatar of hipal

ASKER

Thanks for reply.

Can you please please give a small code snippet doing that ?
Avatar of hipal

ASKER

Moreover doing it this way .. I guess I will have to create a separate new JWindow everytime I want a popup with text field. or else I will have to add/remove JTextFields everytime ??
ASKER CERTIFIED SOLUTION
Avatar of ksivananth
ksivananth
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of hipal

ASKER

But this is really strange that there is no in built pop up with text field. As it is used pretty frequently.

Moreover I want to add functionalities like .. popping it up next to pressed button.

And depending on which button is pressed I want to save text entered at different places. All this will require additional  code. :(
yes, it needs lots of code, you need to get the click location and place the window in that location!
you may follow this idea as well, no need to worry about the location, http://www.coderanch.com/t/341327/GUI/java/custom-popup-panel-display-hide