|
First, never draw, etc. directly in a JFrame, even though it seems to allow it. The convenience methods actually write on the RootPane's ContentPane. Instead, always add a container to the ContentPane, such as a JPanel, and draw, etc., on that.
Now that you are drawing on a JPanel, you can add a JDialog. Use that to get the user input.
|