Write a JavaFX application that implements a simple text editor. Use a text field and a button to get the file. Read the entire file as characters and display it in a TextArea. The user will then be able to make changes in the text area. Use a Save button to get the contents of the text area and write that over the original file. Technical Details: Read each line from the file and then use the method append( aString) to display the line in the text area. The method getText will return all of the text in the text area in a string that then can be written to the file.

Surprisingly, using just the built-in text area component of Java a simple editor can be created. The text editing is done via the operating system on the text in the component. What is left for us to do is to read and write the file, which is accomplished with a pair of methods.


See the code in SimpleEditor.java.

Computer Science & Information Technology

You might also like to view...

How many and what kind of variables (primitive or object) are created in the code below?

``` > double cost = 19.20; // cost is a primitive variable > double percentOff = 0.4; // percentOff is a primitive variable > double salePrice = cost * (1.0 - percentOff); // salePrice is a primitive variable ```

Computer Science & Information Technology

You can add new tabs to the Ribbon, but the order of the tabs CANNOT be changed

Indicate whether the statement is true or false

Computer Science & Information Technology

Using Windows To Go, technicians can prepare standardized corporate Windows 8.1 ________ from which users can access their desktop on any machine in alternative work locations such as home, hotel, or client computer location. All necessary files, applications, and the Windows 8.1 operating system are hosted on a portable USB drive such as a thumb drive or portable hard drive

a. Applications b. Files c. Images d. Passwords

Computer Science & Information Technology

Which of the following is NOT a desktop operating system?

A. Windows B. Google Android C. OS X D. Chrome OS

Computer Science & Information Technology