I'm working in a Netbeans GUI project. All I want to do is to read a text file from a path and display it in a JTextArea
using Netbeans. How can I achieve this?
Is there any simple way to do this just using the file path?
Lets say i want this be done after a button click..
read Oracles tutorial about How to Use Text Areas
use JTextArea.read(Reader in, Object desc) throws IOException
请参阅JTextComponent.read(Reader,Object)
以获取几乎一个“单行解决方案”。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.