The loop will have to come out of the listener. You can not loop inside of the listener. The looping will be as I described in the last post.
Type: Posts; User: Norm
The loop will have to come out of the listener. You can not loop inside of the listener. The looping will be as I described in the last post.
You are going to have to redesign the logic to use fields in the GUI instead of the option pane prompts.
There won't be a loop inside of your code. The "loop" will be sort of like this:
you...
Using a GUI is sort of the opposite of using prompts with JOptoinPanes.
You present the GUI to the user, he fills in data or checks some options and presses a button.
The program then collects the...
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import java.util.Random;
import java.util.Scanner;
public class WordGuessGame
{
Please post your code in the forum that you want looked at.