I'm trying to set up jButtons with different images like such 

--------------------------------- h t m l -----------------------------------
....
<PARAM name="Prev-passive" value="Pbutton2.gif">
<PARAM name="Prev-active" value="Pbutton3.gif">
<PARAM name="Prev-disable" value="Pbutton4.gif">
.....
--------------------------------- h t m l ------------------------------------

the images are read in like thus

--------------------------------- j a v a -------------------------------------
...
protected Image pImage1
...
pImage1 = this.getImage(this.getDocumentBase(), this.getParameter( "Prev-passive" ));
...

   jPrevButton.setIcon (new  ImageIcon (pImage1));
...
-----------------------------------------------------------------------


when the applet tries to read the files it gets a FileIO exception from the security 
manager like such

-------------------------------- java console ---------------------------------
netscape.security.AppletSecurityException: security.checkread: Read of 
'NbuttonImage3.gif' not permitted
  at netscape.security.AppletSecurity.checkRead(AppletSecurity.java:608)
  at netscape.security.AppletSecurity.checkRead(AppletSecurity.java:493)
  at java.lang.SecurityManager.checkRead(SecurityManager.java:545)
  at sun.awt.SunToolkit.getImageFromHash(SunToolkit.java:110)
  at sun.awt.SunToolkit.getImage(SunToolkit.java:124)
  at javax.swing.ImageIcon.<init>(ImageIcon.java:64)
  at javax.swing.ImageIcon.<init>(ImageIcon.java:83)
  at VTour.init(VTour.java:99)
* at 
netscape.applet.DerivedAppletFrame$InitAppletEvent.dispatch(DerivedAppletFrame.java:553)
  at java.awt.EventDispatchThread$EventPump.dispatchEvents(EventDispatchThread.java:81)
  at java.awt.EventDispatchThread.run(EventDispatchThread.java:135)
--------------------------------------------------------------------------------

Can someone please give me some ideas the ful code is available at 

www.digital-babylon.com/strangedos/java


thanks,

Joel McCrty












----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to