How to add swing characteristics to this hurkle game code?

The given version of the program is a console-based version (which means that the inputs and outputs happen on the console screen). Run this code for the Hurkle game to see how it runs. It works well in the console, but its job is to convert it to run in SWING with more graphic feedback for the user. Your job is to experiment with the given code, and then adapt it by incorporating SWING features, so that the inputs and outputs will be more oriented to the GUI, instead of the console.

import java.util.Random;

import java.util.Scanner;

public class Hurkle

{

            publicstaticvoid main (String[] args) {

// ALL Automatic generation of auxiliary code

// get the user input for the keyboard

Scanner entry = New scanner (System.in);

// Get a random number between 0 and 1

Random run = newRandom ();

// variable to contain the users' conjecture

int usersAnswer;

LIMIT finalint = 10;

// variable to maintain the random number of the system

int rGuess;

rGuess = ran.nextInt (LIMIT);

// Here we are creating an array of strings of a character in a string variable called & # 39; show & # 39;

Rope[] display = {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10"};

System.out.println ("You get 3 attempts to win!");

// Tell the user how many attempts they will get

for (attempt attempts = 0; attempts of <3; attempts ++) {

// ask the user for a guess

System.out.println ("What is your number conjecture?" + & # 39;  N & # 39;);

// using the scanner class, have the user guess

usersAnswer = input.nextInt ();

if (usersAnswer == rGuess) {

System.out.print ("Bingo, you win!" + & # 39;  N & # 39;);

tries = 9999; // 9999 is used because it is so far from the limits that it has to leave the game

} else if (usersennswer < rGuess){

                       display[usersAnswer] = ">";

// replace the guessed number of the user with comments: greater than, this is saving the comments

} else {// so that it does not get lost for the user

monitor[usersAnswer ] = "<";

// replace the guessed number of the user with comments: less than

}

// Show the number line with comments

System.out.print ("Feedback:");

for (int i = 0; i <display.length; i ++) {

System.out.print (show[i] + "");

}

} // end of loop for the game

System.out.println (& # 39;  n & # 39;);

System.out.println ("Game Over, 3 attempts you lost, the number was" + rGuess); // 3 attempts you lose

}

}