It's not a secret anymore!
The moose likes Swing / AWT / SWT and the fly likes Reading lines from file and display? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply Bookmark "Reading lines from file and display?" Watch "Reading lines from file and display?" New topic
Author

Reading lines from file and display?

Max Power
Ranch Hand

Joined: May 10, 2004
Posts: 47
hi, i am trying to read the content from a file and while this happens i want to display the current line in a dialog. there should be an output like:

reading: linecontent

do i need to start that in a new thread?

THANKS :-)
Gregg Bolinger
Ranch Hand

Joined: Jul 11, 2001
Posts: 15230

Depends on what part you don't know how to do or are having problems with. Since this is the GUI forum, let's talk about that part of it.

You can't just write lines to a dialog. You will need something like a JTextArea, which would be the easiest, or you could create JLabels with the text from each line and put those on a frame of some sort.

I would recomend putting the text in a JTextArea. But before we go any further, have you done any GUI programming in Java? What are you going to need help with?
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Reading lines from file and display?
 
Similar Threads
Problem : unable to get Japanese Character on Swing
reading and displaying file of unknown type on the browser.
How dipsplay images in Struts
Handling dynamic content in Internationalization
Array dimension missing