简体   繁体   中英

How can i read a text file and diplay it in a netbeans JTextArea?

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..

请参阅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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM