aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes getting a button(open) to trigger the file chooser Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "getting a button(open) to trigger the file chooser" Watch "getting a button(open) to trigger the file chooser" New topic
Author

getting a button(open) to trigger the file chooser

ugo okoye
Greenhorn

Joined: May 03, 2006
Posts: 3
Hi, i've designed a text editor but i can't seem to get my File Open, Save Buttons to function properly.can anyone tell me which classes i need to get them work. appreciate the help.
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
http://java.sun.com/docs/books/tutorial/uiswing/components/filechooser.html
ugo okoye
Greenhorn

Joined: May 03, 2006
Posts: 3
thanks man, but i need another favour. can you tell me how to effect a save because the books i have seem to talk about char and byte being written to my memory.i was wondering how i could get to save a document without having to pass the name of a file like ("file.txt").
Thorsten Klonk
Greenhorn

Joined: Aug 28, 2006
Posts: 7
First, you must implement the ActionListeners to call the methods for opening or saving the files.


(Already done? - For sure.)

The next step for opening a specific file is to implement the method for opening the file:



If you understood the way of opening files, you could implement methods for saving files easily

Greetings,
Thorsten


must not sleep<br />have to warn the others
 
Consider Paul's rocket mass heater.
 
subject: getting a button(open) to trigger the file chooser