Hi all.
I'm trying to get an imageicon into BorderLayout and I'm getting this error message from the
java console:
...
java.security.AccessControlException: access denied (java.io.FilePermission bottlenose.jpg read)
at java.security.AccessControlContext.checkPermission(Unknown Source)
...
This seems strange because following code works well:
but there seems to be no javax.swing equivalent for getImageIcon.
Of course I'm assuming I need to use either getDocumentBase() or getCodeBase() to get pass the "access denied" problem. Following code should work, but it doesn't
TIA :-)
I think the question should be "how does one use getDocumentBase() win getImageIcon()" ?
Without getDocumentBase(), it seems I cannot get the image.
Okay, this code works and fetch the "icon" back.
But resize() didn't iconify my picture ie. it didn't shrink it so that it becomes an icon. I was hoping to put the iconified barn owl next to the label text...
By the way, it doesn't seem to matter whether I use SWING's super.paintComponent(g) or not ...
[ November 10, 2003: Message edited by: achana chan ]