Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Reading lines from file and display?  RSS feed

 
Max Power
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!