Question: Redo the Day program from Chapter 8 as a GUI. Use a scroll bar for the month and a TextField for the year that must
Redo the Day program from Chapter 8 as a GUI. Use a scroll bar for the month and a TextField for the year that must be filled in if the month is February. Use a read only TextField for the line of the poem that you output.



import java.util.Scanner; public class SK_DaysTester public static void main(String[] args) //declare variables int month; int year; //Scanner class object to read input Scanner keyboard = nev Scanner (System.in); //Read month number from keyboard System. out.print("Enter a month(1-12):") month = keyboard.nextInt(); //Read year number from keyboard System. out.print("Enter a year:" year = keyboard.nextInt(); //Creates an instance of class SK_Days vith input months and days SK-Days sk days = new SK-Days (month, year) ; //Call the method getNumberOfDays int days - skdays. getNumberOfDays () //print days System.out.println (days+" days
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
