Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to add browse button to the applet

 
preddy Narra
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
i want to add a "browse" button to an APPLET.
pls give me the code.

PC
 
Joe Ess
Bartender
Pie
Posts: 9259
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

But I think that there's more to your question.
 
preddy Narra
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
preddy Narra
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic