Gene Dias wrote:So you prefer the long answer
Depends what you mean by 'the long answer'
Gene Dias wrote:but you don't want me to be a CodeMill.
Did you go through the link to find
why?
Gene Dias wrote:A Popup object does not allow a user to edit the JTextArea
Wrong. It does not
by default allow the user to edit the JTextArea. Changing that behavior is just a matter of invoking the relevant methods. One method, actually.
Gene Dias wrote:but there are several ways to get a Pop Up, popup or PopUp without it being of type javax.swing.Popup. One is a JDialog.
I wouldn't classify a JDialog as a popup. JPopupMenu, maybe. But the question was about Popup misspelled PopUp, and my initial response was appropriate to the question and could elicit some clarification and a better framed question, benefiting Priyatham in the process.
Your copy/pastable code snippet was akin to spoonfeeding, which is why I pointed you to the FAQ page.
Gene Dias wrote:If you want to keep the focus on the pop up until the user is done entering the text, you can set modal, but that is simply an option.
Not really relevant, but OK.
Gene Dias wrote:In my sample, I did not set any layout manager, size, text, etc. that I leave for you.
I quote you again:
you'll need to set your bounds etc.
That
isn't a suggestion to use an appropriate layout manager.
Moreover, your code snippet retains the default BorderLayout of the JDialog, and setBounds(...) would be ineffective.