Hi there,


I am creating a cinema booking system for my assignment, I have used filewriter to create my file called Movie.txt, i have 3 string one (title, director, info) i would like that my file display in a JtextArea, any help how to do.
i have my menu bar with items, the one that i would like to use is showmovie when clicked my movie.txt display in JtexArea

thx for your help

Recommended Answers

All 4 Replies

and your question/s is/are

my question is the How to read a txt file in a JTextarea?
thx

there are two area

1/ File workAournd http://download.oracle.com/javase/tutorial/essential/io/index.html (note NIO.2 is part of Java7)
- open File
- read File
- put FileContent to Array (or directly to the JTextArea)

2/ JTextArea http://download.oracle.com/javase/tutorial/uiswing/components/textarea.html
- build proper GUI
- add JScrollPane
- add JTextArea

both on http://www.java2s.com/Code/Java/CatalogJava.htm

Thank you very much,

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.