views:

58

answers:

1

Hello all, I am trying to get my options straight with some inputs that I want to enter in an application I am developing.

I want the user to input a list(of Strings) of which the size will be his decision.

I have thought of some crude solutions, like going with JOptionPane until user enters a specific input, but I would like a solution where the user can see his previous entries before he submits them all (unlike the JOptionPane solution). So I guess my question is, if there's any fast/easy way to do this - similar to JOptionPane's easiness and speed, instead of making a whole JPane design for it.

Thanks

+1  A: 

I don't know of a fast and easy solution like JOptionPane. I think your best bet is to create a one-column JTable inside a scroll pane. There's a fairly straight-forward JTable tutorial that should get you started.

Bill the Lizard
I was actually wondering if there is a way to halt the JOptionPane in place after the answer is given and open a new one while the previous is still there. But I guess by the way JOptionPane is defined, that is not possible is it?
devilwontcry
@devilwontcry: I don't think so. You could get that behavior, but you'd still have to write your own custom dialog to store the information. It would probably be better (for the user) to just create one that shows all the information on the dialog at once.
Bill the Lizard
Yes I suppose I can't avoid it in some way. Thank you very much for the fast response and interest people. Cheers!
devilwontcry