开发者

Java - Efficient way to get specific input from user

开发者 https://www.devze.com 2023-01-04 15:06 出处:网络
I am trying to get my options straight with some inputs that I want to enter in an application I am developing.

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 S开发者_JS百科trings) 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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消