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 A Few Questions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "A Few Questions" Watch "A Few Questions" New topic
Author

A Few Questions

Matt DeLacey
Ranch Hand

Joined: Oct 12, 2000
Posts: 318
Hey Ranchers--
I have a few questions:
1.) OK, everybody asks how you can access the local file
system from an applet. I've seen this asked it seems
like hundreds of times. It seems clear you can't do this
in an applet unless the applet is signed or you are
using appletviewer and you specify security settings blah
blah blah. But, I've seen it done in several places
on the web. So, I guess they're not using Java, but
how exactly are they doing it?
2.) I want to be able to have a drop down box (I have been
using Choice), but I want the user to to be able to
select multiple items. I tried using CheckboxMenuItem
but I think that can only be used with Frames. I tried
a PopupMenu with a TextField and I could make it all
work but everytime I show() it has the same name as
the parent on all the items in the PopupMenu no matter
what I do. That or it doesn't show the any names. Is
there a way I can accomplish this. A snippet of code
would make you my best friend because I have seen
several descriptions but can't make them work and I
have spent several, several hours on it.
3.) I want a dropdown menu like a choice but I want the
choices to be little icons or pictures or whatever.
I can't see any way to do this but know it's possible.
I can't use swing because it's an applet and I want
it to work on a webpage without requiring the user
have the plugin.
P.S. In case it wasn't clear, I don't want the user to
use swing OR have it just be functional in appletviewer
because I want to actually deploy this on a webpage.
Responses will be rgeatly appreciated and in fact
I will spend several minutes thinking really good thoughts
about anybody who replies. Hey, who couldn't use a little
extra good karma?

With Respect,
Matt
Stephanie Grasson
Ranch Hand

Joined: Jun 14, 2000
Posts: 347
Hi Matt!
In order of your questions:
(1) I'm not sure how they are doing it. Do you have an example of a site which does this?
(2) Here is a sample code which does what you asked (shows a popup menu in which the user can select multiple items at the same time):

(3) I haven't tried to show images like you describe without using Swing, but this person had a similar question about showing an image on a button without using Swing, so maybe it will help you:
http://www.javaranch.com/ubb/Forum2/HTML/000865.html
I hope this helps. (Please let me know if I have qualified to become your new best friend and receive several minutes of good thoughts/good karma).

Stephanie
Matt DeLacey
Ranch Hand

Joined: Oct 12, 2000
Posts: 318
Stephanie,
Most assuredly! You should be feeling the warm glow of good thoughts right about....NOW! They should continue for quite sometime.
My Thoughts:
"Stephanie is nice, Stephanie is kind, Stephanie is good,
Stephanie is nice, Stephanie is kind, Stephanie is good,
..."

With Respect,
Matt
P.S. Oh yeah, since your my best friend now, it might be a good idea for you to take up beer drinking.
Mindy Wu
Ranch Hand

Joined: Jan 12, 2001
Posts: 121
My answer is to question #2:
You can use JList object to display a serie of item, and allow the user to select multiple choices.
listboxname.MULTIPLE_INTERVAL_SELECTION.
Hope i can help more.

Mindy
Matt DeLacey
Ranch Hand

Joined: Oct 12, 2000
Posts: 318
Thanks Mindy, but, as I said, I don't want to have to use
Swing as I want to deploy it on the web and I don't want users
to have to have the plugin. But thanks just the same.
With Respect,
Matt DeLacey
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: A Few Questions
 
Similar Threads
List object and PopupMenu
JPopupMenu JMenuItem and JMenuItem : Listen to each other?
Use Apache client to logon and then transfer flow to web browser
PopupMenu and MouseMotionListener
Popup lists