Project #160594 - Java Swing GUI

Computer Tutors

Subject Computer
Due By (Pacific Time) 12/15/2016 08:00 am

  • Create a new class called that extends JFrame, and set the window title to "Guessing Game" 
  • Using BorderLayoutcreate a north panel, center panel, and south panel
    • The north panel will have a JLabel with the text "Guess a number between 1 and 10?" (1 point)
    • In the center panel, add a JTextField where the user can enter a number to guess, and also add a JButton called "Guess" (1 point)
    • The south panel will have a JLabel for displaying if the user guessed correctly or not (1 point)
  • When the user clicks the "Guess" button
    • Make the south panel background color GREY if they guessed wrong, and display "Sorry try again". Be sure keeping a running total for number of attempts(1 point)
    • Make the south panel background color YELLOW if they guessed right, and display "YOU GOT IT (n attempts)", where n is the number of attempts the user guessed (1 point)
    • Make the south panel background color RED if they entered an invalid number (not between 1 and 10). (1 point)
    • After the user guessed correctly, set the number of attempts back to 0, and generate a new Random Number for a new guessing game. (1 point)


I have the guessing game finished but dont know the swing GUI stuff. 


out of 1971 reviews

out of 766 reviews

out of 1164 reviews

out of 721 reviews

out of 1600 reviews

out of 770 reviews

out of 766 reviews

out of 680 reviews