I am trying to open a txt file in a JTextArea. I know I have to use the .read() method, but how is executed so that the entire file can be viewed in my textArea? I am trying to create a simple text editor(like notepad) and I can't find any helpful tutorials to help me through this process. Why does Java make it so hard for you to open and save/write to files. Seems like it should all come standard in a method instead of coding out the process every time? Any good beginner tutorials for this would be appreciated too!!!
The text area will most likely need to be nested in a JScrollPane. As for reading and writing, Java makes one way to do it. Can you imagine the fun you'd have if you had to open/read/write files a different way for each context that you wanted to use it in? No, that wouldn't be much fun at all. One way. That's much easier. After about your third time, it only takes about 4 seconds anyways. Oh, the Swing tutorial will probably be of help to you. It doesn't do much to unify all the components in a giant example that would bring everything together in your brain. But it does a good job, nonetheless.
Luckily reading and writing to a file is pretty easy in Java. The I/O and Streams forum would be a good place to ask file I/O questions. The Swing / JFC / AWT forum would be a good place to ask GUI questions, like working with JTextArea. Now, you mentioned that you aren't finding any good tutorials. Here is a list of free on-line Java tutorials and books that I have found useful: