Java pop ups that require data

What code would I use to let users enter their grades in a pop-up window?

When I press JButton, I want to pop up a small box and prompt users to enter their grades In addition, can I get the value of the entered double value?

Thank you for all your time I appreciate it!

Solution

Use joptionpane showInputDialog().

You can http://download.oracle.com/javase/tutorial/uiswing/components/dialog.html#input Find a good tutorial

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>