Solved

pop up textfield/area in java swing

Posted on 2010-11-08
7
449 Views
Last Modified: 2012-05-10
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
Comment
Question by:hipal
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 26

Expert Comment

by:ksivananth
ID: 34090671
you may want to add them into a JWindow and show/hide as popup!
0
 

Author Comment

by:hipal
ID: 34090698
Thanks for reply.

Can you please please give a small code snippet doing that ?
0
 

Author Comment

by:hipal
ID: 34090712
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 26

Accepted Solution

by:
ksivananth earned 500 total points
ID: 34090719
you can just re-use them, if creating everytime is expensive, just make visible true/false!
0
 

Author Comment

by:hipal
ID: 34090739
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
 
LVL 26

Expert Comment

by:ksivananth
ID: 34090780
yes, it needs lots of code, you need to get the click location and place the window in that location!
0
 
LVL 26

Expert Comment

by:ksivananth
ID: 34090814
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A short article about a problem I had getting the GPS LocationListener working.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question