How to create dialog boxes (need to get 2 int values) in java using swing?

Closed due to the fact that off-topic by user207618, rjhdby , Bald , dirkgntly , Streletz on Oct 10 '16 at 11:54 .

It seems that this question does not correspond to the subject of the site. Those who voted to close it indicated the following reason:

  • “Questions asking for help with debugging (“ why does this code not work? ”) Should include the desired behavior, a specific problem or error, and a minimum code for playing it right in the question . Questions without an explicit description of the problem are useless for other visitors. See How to create minimal, self-sufficient and reproducible example . " - community spirit, rjhdby, Bald, dirkgntly
If the question can be reformulated according to the rules set out in the certificate , edit it .

1 answer 1

Use JDialog to create dialog boxes. On them you already place the elements you need, in which the user enters values ​​and get your 2 int values. defaultcloseoperation - must be suspend_on_close, otherwise the window will close the entire program.