Question: can you please help me to solve this java program Create an Eclipse Project called JavaProgram. Create a simple JFrame GUI with a JButton called
can you please help me to solve this java program

Create an Eclipse Project called JavaProgram. Create a simple JFrame GUI with a JButton called inputButton. Create an array in your program called stringArray with the contents defined as \{"Munster","Ulster","Connacht","Leinster" }. Create and add a JLabel with the String "Please enter the array index you wish to output: ". Use a JTextfield called inputField to input the index number of the array requested by the user. Create and add a JLabel called outputLabel to output the contents of the array at the index requested by the user, e.g., if the user enters ' 0 ' output "Munster" to the output label, e.g., outputLabel.getText(array[0]). Add the listeners necessary to get the index and display the contents of the array and display in the output field. Place a try..catch block around the code to output the contents of the array: catch an ArrayIndex0utOfBoundsException. If this exception is caught (requesting beyond the array size!!) use an option pane input dialog to give the user a second chance to try and output within the array bounds and show the output in the outputLabel, e.g., message via the input dialog "You attempted to access beyond the limits of the array, please try again". If the user fails to keep within limits again you do not have to deal with that! Jar the project and test the running of the project from the jarfile. Javadoc the project
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
