File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Applets and the fly likes How to add browse button to the applet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "How to add browse button to the applet" Watch "How to add browse button to the applet" New topic
Author

How to add browse button to the applet

preddy Narra
Greenhorn

Joined: Jul 06, 2006
Posts: 12
Hi,
i want to add a "browse" button to an APPLET.
pls give me the code.

PC
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8710
    
    6


But I think that there's more to your question.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
preddy Narra
Greenhorn

Joined: Jul 06, 2006
Posts: 12
hi joe,
actually iam looking for a code that contains browse button.

here BROWSE button means,suppose in e-mail system we can find BROWSE button to add some files to the mail.

pls respond..

from PC
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39549
    
  27
The button should create and show a FileDialog or JFileChooser. Once the file is chosen, you use any of the java.io classes to read it. Of course, the applet needs to be signed to do any of this, or it won't be allowed to use these classes.


Ping & DNS - updated with new look and Ping home screen widget
preddy Narra
Greenhorn

Joined: Jul 06, 2006
Posts: 12
hi Ulf,

Actually my button should show the list of files in my system.

After that i will choose any file.

After that i know the process to read, but before that button should give the list of files..

plz respond..
PCREDDY
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39549
    
  27
Yes, that's exactly what the classes I mentioned do. If you're having trouble using them, you can read up JFileChooser here and on FileDialog here.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to add browse button to the applet
 
Similar Threads
How do I add a ButtonGroup in an applet?
code for the "add" button in file system
how to delete multiple browse
Applet Program
Browse Button Value