Question: if you cant do it please dont waste my question JAVA Run this program, understand it, design a GUI for this program. Your GUI should

if you cant do it please dont waste my question

JAVA

Run this program, understand it, design a GUI for this program. Your GUI should allow user interaction with the applications. The GUI must allow for user input and output file creation. Said GUI must be able to perform the tasks of file creation, data input and saving, and data retrieval and output. You should also include instructions to the user on what and how to use your program. Remember user-friendly. You should not have to rewrite any of the example programs just modify them to use a GUI.

Add comments to code please

import java.util.Scanner; import java.io.File; import java.io.FileNotFoundException; public class TextFileInputDemo2 { public static void main(String[] args) { System.out.print("Enter file name: "); Scanner keyboard = new Scanner(System.in); String fileName = keyboard.next(); Scanner inputStream = null; System.out.println("The file " + fileName + " contains the following lines: "); try { inputStream = new Scanner(new File(fileName)); } catch(FileNotFoundException e) { System.out.println("Error opening the file " + fileName); System.exit(0); } while (inputStream.hasNextLine()) { String line = inputStream.nextLine(); System.out.println(line); } inputStream.close(); } } 

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To address your requirement of creating a GUI we will use Java Swing as it provides a simple way to create a platformindependent GUI for Java applications Ill guide you through the steps necessary to ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!