Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 460
  • 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

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