Opening Text File
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Tuesday, August 21, 2001 12:26 AM

Hi all...

I have developed an application which when the user presses JButtons/Menus etc certain events are performed.


An example is in which a file is written to the desktop when the user selects a menu item.
I wanted to be able to have e.g. a JButton which once selected by the user opens a specified text file. I wasnt sure what code to add to the event handling for the Jbutton, in order to open the text file?


Any help much appreciated...

Re: Opening Text File

Posted By:   Dermot_Hennessy  
Posted On:   Tuesday, August 21, 2001 02:58 AM

It probably depends on what you want to do with the file having opened it (do you want random access, sequential access, etc....)


I recommend looking at the examples in the Java tutorial - see I/O: Reading and Writing (but no 'rithmetic). The code samples therein should help you.

Dermot

About | Sitemap | Contact