Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Mining Concepts And Techniques

Authors: Jiawei Han, Micheline Kamber, Jian Pei

3rd Edition

0123814790, 9780123814791

More Books

Students also viewed these Databases questions

Question

Which job has negative profit?

Answered: 1 week ago