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.io.PrintWriter; import java.io.FileNotFoundException; import java.util.Scanner; public class TextFileOutputDemo { public static void main(String[] args) { String fileName = "out.txt"; //The name could be read from //the keyboard. PrintWriter outputStream = null; try { outputStream = new PrintWriter(fileName); } catch(FileNotFoundException e) { System.out.println("Error opening the file " + fileName); System.exit(0); } System.out.println("Enter three lines of text:"); Scanner keyboard = new Scanner(System.in); for (int count = 1; count <= 3; count++) { String line = keyboard.nextLine( ); outputStream.println(count + " " + line); } outputStream.close( ); System.out.println("Those lines were written to " + fileName); } } 

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To address your task lets design a simple GUI application in Java using Swing The GUI will allow the user to enter text that will be saved to a file all while reusing the existing logic from your prov... 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!