Problem

Write an application or applet that implements a simple text editor. Use a text field and...

Write an application or applet 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 JTextArea. 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 display the line in the text area using the method append(aString). The method getText will return all of the text in the text area in a string that then can be written to the file. The following statement will make the text area referenced by editorTextArea scrollable:

JScrollPane scrollPane = newJScrollPane(editorTextArea);

Then add scrollPane to your GUI, just as you would any other component. The text area editorTextArea does not need to be added to the GUI, but it can be used

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT