简体   繁体   中英

How to use icon in Java applet?

在此处输入图片说明

I want to use my icon in a Java applet. How can I do that?

There are two different Platform Look and Feels there. But what I think you're getting at is that one is a signed application and one isn't.

There is a documented process you need to follow to sign your application so it doesn't have the warning icon and the unchecked box.

http://docs.oracle.com/javase/tutorial/security/toolsign/index.html

http://www.oracle.com/technetwork/java/javase/tech/index-jsp-136112.html

I am not pretty sure things you want to do with the restricted access dialog icon...

But, actually, the uploaded image you showed in your question it is NOT A PART OF " your application " but jre restricted access dialog.

在此处输入图片说明

It shows when you are trying to run a signed applet... It allows you :

  • A) run your applet once with unrestricted access
  • B) or place the applet cert to certs storage to make it trusted and run it with no security dialog later

It sounds strange but in other words your question is about "changing something on client machine JRE" :S So I guess it is a bad idea trying to change the jre "Warning-Security" dialog icon itself :S


Even if you starts a pretty correct signed applet once you still will have the restricted access dialog shown until you makes the cert trusted; So anyway the dialog will be shown even once for having cert trusted; It makes me think you anyhow cannot avoid having this dialog showing for your signed applet;

Still you can make the restricted access dialog NEVER BEEN SHOWN; But the only way to do so is keeping your applet in sandbox frames using "unrestricted - the harmless" libraries in your applet project and your applet should be unsigned; For more detailed information what unsigned applet can do or what they're can't you can read this tutorial;

PS In the case you meant something else in your question please do comment

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM