[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 464
  • Last Modified:

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.
0
hipal
Asked:
hipal
  • 4
  • 3
1 Solution
 
ksivananthCommented:
you may want to add them into a JWindow and show/hide as popup!
0
 
hipalAuthor Commented:
Thanks for reply.

Can you please please give a small code snippet doing that ?
0
 
hipalAuthor Commented:
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 ??
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
ksivananthCommented:
you can just re-use them, if creating everytime is expensive, just make visible true/false!
0
 
hipalAuthor Commented:
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. :(
0
 
ksivananthCommented:
yes, it needs lots of code, you need to get the click location and place the window in that location!
0
 
ksivananthCommented:
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
0

Featured Post

Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now