Open applet on internet explorer

Hi i have created the following applet :
import java.applet.*;
import java.net.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.applet.Applet;
public class Applet11 extends Applet {
  FlowLayout f1= new FlowLayout();//������� ��������
  int alignement=FlowLayout.CENTER;
  JLabel jLabel1 = new JLabel();//������ ��������
  JLabel jLabel2 = new JLabel();
  JLabel jLabel3 = new JLabel();
  JTextField jTextField1 = new JTextField();//���������� ������ ��������
  JTextField jTextField2 = new JTextField();
  JButton jButton1 = new JButton();//������ ��������
  JButton jButton2 = new JButton();
  JButton jButton3 = new JButton();
  JButton jButton4 = new JButton();
Color blue = new Color(240,244,249);
  Font m=new Font("Palatino Linotype",Font.PLAIN,14);
private int current = 0;
  private ImageIcon[] images=new ImageIcon[31];
  public void init() {
    images[0]=new ImageIcon("palaio/Image8.jpg");
    images[1]=new ImageIcon("palaio/Image22.jpg");
    images[2]=new ImageIcon("palaio/Image30.jpg");
    images[3]=new ImageIcon("palaio/Image36.jpg");
    images[4]=new ImageIcon("palaio/Image42.jpg");
    images[5]=new ImageIcon("palaio/Image63.jpg");
    images[6]=new ImageIcon("palaio/Image68.jpg");
    images[7]=new ImageIcon("palaio/Image71.jpg");
    images[8]=new ImageIcon("palaio/Image72.jpg");
    images[9]=new ImageIcon("palaio/Image73.jpg");
    images[10]=new ImageIcon("palaio/Image80.jpg");
    images[11]=new ImageIcon("palaio/Image82.jpg");
    images[12]=new ImageIcon("palaio/Image83.jpg");
    images[13]=new ImageIcon("palaio/Image85.jpg");
    images[14]=new ImageIcon("palaio/Image87.jpg");
    images[15]=new ImageIcon("palaio/Image92.jpg");
    images[16]=new ImageIcon("palaio/Image93.jpg");
    images[17]=new ImageIcon("palaio/Image94.jpg");
    images[18]=new ImageIcon("palaio/Image95.jpg");
    images[19]=new ImageIcon("palaio/Image96.jpg");
    images[20]=new ImageIcon("palaio/Image101.jpg");
    images[21]=new ImageIcon("palaio/Image102.jpg");
    images[22]=new ImageIcon("palaio/Image111.jpg");
    images[23]=new ImageIcon("palaio/Image113.jpg");
    images[24]=new ImageIcon("palaio/Image115.jpg");
    images[25]=new ImageIcon("palaio/Image117.jpg");
    images[26]=new ImageIcon("palaio/Image118.jpg");
    images[27]=new ImageIcon("palaio/Image119.jpg");
    images[28]=new ImageIcon("palaio/Image120.jpg");
    images[29]=new ImageIcon("palaio/Image121.jpg");
    images[30]=new ImageIcon("palaio/telos.jpg");
    jLabel1.setText("������");
    Font n=new Font("Palatino Linotype",Font.PLAIN,14);
    Font f=new Font("Palatino LinoType",Font.PLAIN,12);
    Font m=new Font("TimesRoman",Font.PLAIN,14);
    jLabel1.setFont(f);
    jLabel1.setText("����\u1FD6�");
    jLabel1.setVisible(false);
    jLabel2.setText("");
    jLabel2.setPreferredSize(new Dimension(200,40));
    jLabel3.setFont(m);
    jLabel3.setText("�������������� ���");
    jTextField1.setPreferredSize(new Dimension(280, 30));
    jTextField1.setFont(n);
    jTextField2.setPreferredSize(new Dimension(200, 22));
    jButton1.setText("��������");
    jButton1.addActionListener(new Applet11_jButton1_actionAdapter(this));
    jButton2.setText("��������");
    jButton2.addActionListener(new Applet11_jButton2_actionAdapter(this));
    jButton3.setText("������");
    jButton3.addActionListener(new Applet11_jButton3_actionAdapter(this));
    jButton4.setText("������� ������");
    jButton4.addActionListener(new Applet11_jButton4_actionAdapter(this));
    this.setLayout(new FlowLayout(FlowLayout.CENTER,90,10));
    this.add(jLabel1, null);
    this.add(jLabel2, null);
    this.add(jLabel3, null);
    this.add(jTextField1,null);
    this.add(jButton1, null);
    this.add(jTextField2, null);
    this.add(jButton2, null);
    this.add(jButton4, null);
    this.add(jButton3, null);
  void jButton4_actionPerformed(ActionEvent e){
    jTextField1.setText("");
    jTextField2.setText("");
    repaint();
  void jButton2_actionPerformed(ActionEvent e) {
    jTextField1.setText("");
    jTextField2.setText("");
    repaint();
  void jButton1_actionPerformed(ActionEvent e) {
    if (!jTextField1.getText().equals(""))
      if (jTextField1.getText().equals(jLabel1.getText()))
        jTextField2.setText("����� �����");
      else
        jTextField2.setText("����� ����� �����");
    repaint();
  public void compStrings(Graphics g, String str1, String str2) {
    int tmp;
     if ((!jTextField1.getText().equals(""))&&(!jTextField1.getText().equals(jLabel1.getText()))){
       if (str1.length() > str2.length()) {
      tmp = str1.length() - str2.length();
      for (int i = 0; i < tmp; i++)
        str2 += " ";
    else
    if (str1.length() < str2.length()) {
      tmp = str2.length() - str1.length();
      for (int i = 0; i < tmp; i++)
        str1 += " ";
    int l1 = 170;
    int l2 = 170;
    Character c;
    Font f=new Font("PalatinoLinotype",Font.PLAIN,12);//������ ��������������
    Font r=new Font("PalatinoLinotype",Font.BOLD,12);
    g.setFont(m);
    FontMetrics fm;
    f = g.getFont();
    fm = g.getFontMetrics(f);
    g.setColor(Color.BLACK);
    for (int i = 0; i < str2.length(); i++) {
      if (str1.charAt(i) != str2.charAt(i)) {
        g.setColor(Color.RED);
        g.setFont(m);
        g.drawString(String.valueOf(str2.charAt(i)), l1, 350);
        l1 += fm.charWidth(str2.charAt(i));
        g.setColor(Color.RED);
        g.drawString(String.valueOf(str1.charAt(i)), l2, 300);
        l2 += fm.charWidth(str1.charAt(i));
        g.setColor(Color.blue);
        g.drawString("� ����� ��������� :",20,300);
        g.drawString("��������������� :",20,350);
      else {
        g.setColor(Color.BLACK);
        g.setFont(m);
        g.drawString(String.valueOf(str2.charAt(i)), l1, 350);
        l1 += fm.charWidth(str2.charAt(i));
        g.setColor(Color.BLACK);
        g.drawString(String.valueOf(str1.charAt(i)), l2, 300);
        l2 += fm.charWidth(str1.charAt(i));
public void paint(Graphics g) {
   setBackground(blue);
   jLabel2.setIcon(images[current]);
  super.paint(g);
  this.compStrings(g, jLabel1.getText(), jTextField1.getText());
  if (jTextField1.getText().equals(jLabel1.getText())){
    g.setColor(Color.BLUE);
    g.setFont(m);
    g.drawString("������� �������� ���� ������� ������", 90, 350);
class Applet11_jButton4_actionAdapter
      implements
      java.awt.event.ActionListener {
    Applet11 adaptee;
    Applet11_jButton4_actionAdapter(Applet11 adaptee) {
      this.adaptee = adaptee;
    public void actionPerformed(ActionEvent e) {
      adaptee.jButton4_actionPerformed(e);
        next();
private void next(){
if(current==0)
jLabel1.setText("\u1F30\u1F7C�");
  if(current==1)
jLabel1.setText("\u1F10�������������");
  if(current==2)
jLabel1.setText("�����\u1F78�");
  if(current==3)
jLabel1.setText("�\u1F72");
  if(current==4)
jLabel1.setText("\u1F10��������");
  if(current==5)
jLabel1.setText("����\u1F78�");
  if(current==6)
jLabel1.setText("�\u1F50�");
  if(current==7)
jLabel1.setText("������\u1FF6�");
  if(current==8)
jLabel1.setText("��\u1F74�");
  if(current==9)
jLabel1.setText("\u1F00������");
  if(current==10)
jLabel1.setText("�\u1F56�");
  if(current==11)
jLabel1.setText("\u1F44���");
  if(current==12)
jLabel1.setText("������");
  if(current==13)
jLabel1.setText("\u1F69�");
  if(current==14)
jLabel1.setText("����\u1FE6���");
  if(current==15)
jLabel1.setText("��\u1FE6��");
  if(current==16)
jLabel1.setText("�\u1F78");
  if(current==17)
jLabel1.setText("��\u1F7A�");
  if(current==18)
jLabel1.setText("��\u1FD6�");
  if(current==19)
jLabel1.setText("\u1F51�\u1F72�");
  if(current==20)
jLabel1.setText("�\u1F56�");
  if(current==21)
jLabel1.setText("�����");
  if(current==22)
jLabel1.setText("�������");
  if(current==23)
jLabel1.setText("�����������");
  if(current==24)
jLabel1.setText("����");
  if(current==25)
jLabel1.setText("��\u1F78�");
  if(current==26)
jLabel1.setText("\u1F01�����");
  if(current==27)
jLabel1.setText("����");
  if(current==28)
jLabel1.setText("������");
  if(current==29){
  jButton4.setText("�����");
  this.remove(jButton4);
  this.remove(jButton2);
  this.remove(jButton1);
  this.remove(jTextField1);
  this.remove(jTextField2);
  this.remove(jLabel3);
  current++;
class Applet11_jButton3_actionAdapter
     implements
     java.awt.event.ActionListener {
   Applet11 adaptee;
   Applet11_jButton3_actionAdapter(Applet11 adaptee) {
     this.adaptee = adaptee;
   public void actionPerformed(ActionEvent e) {
      adaptee.jButton3_actionPerformed(e);
private void jButton3_actionPerformed(ActionEvent e) {
  System.exit(0);
  class Applet11_jButton2_actionAdapter
      implements
      java.awt.event.ActionListener {
    Applet11 adaptee;
    Applet11_jButton2_actionAdapter(Applet11 adaptee) {
      this.adaptee = adaptee;
    public void actionPerformed(ActionEvent e) {
      adaptee.jButton2_actionPerformed(e);
  class Applet11_jButton1_actionAdapter
      implements
      java.awt.event.ActionListener {
    Applet11 adaptee;
    Applet11_jButton1_actionAdapter(Applet11 adaptee) {
      this.adaptee = adaptee;
    public void actionPerformed(ActionEvent e) {
      adaptee.jButton1_actionPerformed(e);
  }I have created its html file named Applet 11!
When i open the Applet11.html on the explorer without the images and it's folder the applet is working properly!
When i open it with the images i get the message :
java.security.AccessControlExeption :access denied java.io.FilePermission Image8.jpg
Can anyone tell me what to do so the Applet can work with the images?
Thank you:-)

Can anyone tell me what to do so the Applet can work
with the images?Yes. Sign the applet.
http://java.sun.com/sfaq/
http://java.sun.com/developer/technicalArticles/Security/Signed/

Similar Messages

  • Assertion failed when open Applet in Internet Explorer 7.0 ( Windows Vista)

    I have a problem when loading an applet ( calling from a ASP.NET page ) only in 1 computer ( the others in my company is fine )
    Here is capture of the error dialog i got : http://img134.imageshack.us/my.php?image=editorproblemszx1.jpg
    I try to re-install all Java related program but the problem is still existed ( The applet worked fine before ) . I think re-install Windows Vista can fix but it is the last choice of course
    Would someone please to help me to solve this problem ( not sure if this is a Microsoft's problem ) .
    Thanx in advance

    It seems to be a bug related to fonts.
    Here's a bug related to your one, might give you a clue about some workaround:
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4599491

  • There,are,restrictions,to,opening,PDF,files,on,an,Pad,or,Android,Device,that,will,open,in, Microsoft,Internet,Explorer,desktop,or,laptop.,If,I,bought,a,Windows,8.1,tablet,and,had,Ad obe,reader,installed,would,I,then,be,able,to,open,the,secure,document,wit

    There,are,restrictions,to,opening,PDF,files,on,an,iPad,or,Android,Device,that,will,open,in ,Microsoft,Internet,Explorer,desktop,or,laptop.,If,I,bought,a,Windows,8.1,tablet,and,had,A dobe,reader,installed,would,I,then,be,able,to,open,the,secure,document,with,Internet,Explo rer?

    What's,with,the,commas?
    If you have a tablet that runs full Windows 8 - not Windows 8 RT, which is limited.
    And if you install the full Adobe Reader for Windows, not the special Adobe Reader Touch for Windows 8.
    Then you will have the same features as a desktop.
    Unless they can't be accessed in touch mode, since it isn't a touch app.

  • Cannot open pdf in Internet explorer with a specific site

    Hello,
    I'm running adobe reader 10.1.4 on XenApp 6.5 servers.
    On a specific site some users cannot open pdf in internet explorer. I need to delete there terminal server's profile to have it running fine again.
    My question is; wich file or folder can i delete in user's profile to erase adobe settings?
    Thanks a lot for your help and sorry for my english.

    Hello,
    I forgot to test this solution   but i've tried it this morning without success.

  • Firefox is set as the default browser, but if I click a link in MS Word, the link is opened with MS Internet explorer. Why?

    Firefox is set as the default browser, but if I click a link in MS Word, the link is opened with MS Internet explorer. Why?

    What version of Windows and Office is it? I had this issue with an older version of office and Windows XP. Basically, MS are using their browser (IE) because it's their software (MS Office). If you go to options in MS word though, you should be able to find an option to set the default browser to open links.

  • I cant open many website with firefox, there say filter not let open this site, but when i open they with internet explorer not have any problem.

    i cant open many website with firefox, there say filter not let open this site, but when i open they with internet explorer not have any problem.

    Could you post an example of the filter message?
    This article has more information on the filters built in to Firefox: [http://www.mozilla.org/en-US/firefox/phishing-protection/ Firefox Phishing and Malware Protection].
    It's possible that you also have a Firefox add-on, or external software, that is filtering what you see. However, we don't have enough information to help identify it yet. If you want to review a list of your add-ons, you can find them under: Help > Troubleshooting Information.

  • Applets Crashing Internet Explorer on Windows XP with JRE 1.4.0 Final

    I have recently installed the 1.4.0Final JRE, and have found that upon arriving at a page with an applet on internet explorer explorer crashes. Where as under the JRE 1.3.1_02 it does not.
    I am running Windows XP, and cannot remember the exact error message I get, however it is something about an error occuring within iexplorer.exe
    Any help appreciated.

    I have the same symptom on Windows 2000 (SP2) using Internet Explorer 5.00. Replacing the IE JVM with J2SE 1.4 causes IE to crash when I visit java.sun.com.
    I am filing a bug with the JDC Bug Parade, but I am surprised that this has not been more widely reported, since I think I have a common system configuration.

  • When I install adobe acrobat XI PRO, it converts everything on my computer to an adobe icon, and when I try to open it, it open adobe acrobat. For example, I can't open word, excel, internet explorer, or any other document or program because it thinks its

    When I install adobe acrobat XI PRO, it converts everything on my computer to an adobe icon, and when I try to open it, it open adobe acrobat. For example, I can't open word, excel, internet explorer, or any other document or program because it thinks its acrobat.

    Hi Kate,
    Please refer to this KB doc. for the solution Application, file icons change to Acrobat/Reader icon
    Let me know if the issue persist.
    Regards,
    Aadesh

  • When I open an email and use a link it always opens with win internet explorer, why?

    If an email directs me to a web site the new web site always opens in Windows Internet explorer. I expect it top open in Firefox but this dose not happen.Why?

    Hopefully this support article is what you need:
    http://support.mozilla.com/en-US/kb/How+to+make+Firefox+the+default+browser

  • You can't open the application "Internet Explorer.app" because PowerPC applications are no longer supported.

    You can’t open the application “Internet Explorer.app” because PowerPC applications are no longer supported.

    Why are you using IE?
    If some site is requiring IE, set your user agent string to claim your using IE.
    What is my user agent?
    http://whatsmyuseragent.com/
    iCab - The Taxi for the Internet
    http://www.icab.de/
    Has a pulldown for picking your user agent string.
    There is a safari plugin.
    Robert

  • Trouble opening website via Internet Explorer on PC

    Hi there, I have recently published two websites with iWeb, both of which open and run superbly in Safari on the Mac but when you try and open them on Internet Explorer on a PC only the top of the page will download and the rest of the site is invisible. Does anyone know why this is? I am using iWeb version 1.1.2 and have created both sites on my iMac which is running OS X 10.4.9 if this helps?
    I hope someone out there can help? I can give you the website addresses if you need further info?

    Due to my customer's most common setup I had to address these IE6 issues as well. Some background may illustrate the problems. Not only has IE6 difficulties with .png, but as well for example with lists (in case you use them, they are an undocumented feature of iWeb and somehat buggy), and more. To solve some of the .png issues iWeb spends some code utilizing "Active Script". That drives IE6 to render the page almost completely, and then the script will fix some of the ugly behavior. You can check that by your elements to navigate on top of your pages (these unfortunatley become .png) within IE6, or with the buttons to start a slideshow.
    What I found on your first page: Move the cursor over it, it turns to be a senstive area to start the user's mail program to send a mail to info@... - try to remove that first.
    Even more, there are a lot of setups of IE6 where "Active Script" is forbidden (in banks, insurances companies etc.). Ever tried to force a large organizition to migrate to IE7? Or to allow Active Script, let's say for 30.000 users? You'll get the impact...
    So here is what I did to obtain some compatibility with IE6:
    Installed IE6 on Paralles.
    Switched "Active Script" to "Never".
    Now you can check what is going on
    In my pages:
    Reengineered every element to navigate manually - no iWeb automatism, switched them all to off with iWeb's inspector
    Reconstructed every picture to the size they should be /outside/ of iWeb, using Graphics Converter
    Removed every frame from all text elements in iWeb
    Switched to web and windows compatible fonts (e.g. Courier to Courier New)
    Checked every page to contain plain text instead of graphic - click into the rendered page and try to drag: Does the the whole block move? Then you are on the wrong way
    Removed every formatting attribute from the text: Alignment, Highth etc.
    The only element I couldn't cover is the button for the slideshow - but I've read somewhere else that you can define an object and associate that with a link directly to the script on your server which iWeb puts there. But of course that does not help in case where your favorite visitors are cut off from using Active Script completely.
    Good Luck!
    Kai Schwarzer
    MacBook Pro C2D 2,33 15   Mac OS X (10.4.9)  

  • Certain websites open in html, they open ok in Internet explorer

    When i open www.ttbs.org.uk it appears only in html, it opens fine in internet explorer.

    That page is send as text/plain by the server and not as text/html
    *https://developer.mozilla.org/en/docs/Properly_Configuring_Server_MIME_Types

  • A page on a website which opens fine in Internet Explorer does not display accurately in Firfox...how can I fix this?

    I usually only use Firefox and don't compare screens between Internet Explorer and Firefox. However I was working on a website I am developing with a friend in Seattle and she sent me a trial and the pages don't fit on the screen right, for instance there is a return mail form that runs out of its box and leaves off the bottom of the page. She was having no trouble opening it on her computer (even in Firefox). It opens easily and correctly on my wife's computer in Internet Explorer, as it does on my computer. It is only in Firefox on my computer that it opens wrong. Also, and perhaps it is not related, opening videos in Firefox on my computer takes a long time when they open isntantly on my wife's computer in IE. I have more ready memory, more RAM and more graphics software on my computer than she does. Why should this be happening only in Firefox? I was so happy not using Internet Explorer any longer.
    I have attached a link to a page that I am having trouble with. It is not the only one. My screen does not show me the bottom of the response form where I can submit the form. It only shows half of the image verification code and no place to submit. I bet when you open it up you will see the whole screen.

    I am also having problems with a site I am building. No matter what websafe font I use it displays as New Times Roman in FireFox. The correct fonts show in both IE9 and Chrome.
    In addition, text shifts in FireFox. I have to position other text objects farther and farther apart as I go down the page or they start to overlap. Nav buttons and other images also have to be positioned in the wrong place for them to be in the correct place when the page is opened in FireFox. FireFox should display pages correctly by default. I can't expect th average user to have to tweek his/her settings to display my site.
    I have been recommending FireFox on my website as the best browser. I might have to change that and abandon FireFox myself.

  • Adobe Acrobat Standard and Pro - dialog prompt when opening PDF from Internet Explorer 9

    Good morning.
    I am having an issue where our ends users that have either Adobe Acrobat X Standard (AAXS) or Adobe Acrobat X Pro (AAXP) cannot open a PDF within Internet Explorer 9 without being prompted by a dialog box to OPEN, SAVE or SAVE AS. Our user that have Adobe Reader X (ARX) only are ok. The ARX users can click on a PDF link within the browser and it will automatically open in a new tab. However, the AAXS and AAXP users will click on that same link, but are then prompted with a dialog box to either OPEN, SAVE or SAVE AS. Has any one else seen this before? We would like it to be so that all users - no matter what Adobe PDF program they are using of the 3 mentioned - can open a PDF link by just clicking on the link and no additional dialog options appear.
    The ARX users have the same Internet settings within the Adobe preferences as the AAXS and AAXP users. The check box is checked to have PDFs open within the browser, which they do, but that dialog box always appears for AAXS and AAXP users. Any thoughts?
    Thank you.

    Thanks for the reply. I stumbled across something today after posting. I had already known that If the ARX user also had one of the other products (AAXS or AAXP), then they would get the dialog box. Here is what I just figured out: if the user uninstalled ARX and re-installed (still having both ARX and AAXS or AAXP in the end) then they no longer get the dialog box. It seems like perhaps its an issue the AAXP and AAXS are overwriting something in the registry.

  • Will not open anymore, asking is I want to open file in Internet Explorer.

    I was upgrading my firefox to 5.0 and after that my comuter told me a had a virus threat. I pressed: to put the treat in the "vault" for further dicition, and it starded to remove the threat instead. When it was done and I tried to start firefox again it didn't work. I tried to download it again but it won't start it. It keeps asking me if I want to open the file in "Internet explorer". even if I go to "all progams" and click on it there it wont open. What can I do to make it work agan??? Do I have to delete it and reinstall everything??? The window I had open is still working but I cannot open another window. I really like firefox so I want to fix it!

    See:
    *http://kb.mozillazine.org/Firefox_crashes
    *https://support.mozilla.com/kb/Firefox+crashes
    If you have submitted Breakpad crash reports then post the IDs of one or more Breakpad crash reports (bp-xxxxxxxx-xxxxxxxxx-xxxx-xxxxxxxxxxxx).
    You can find the IDs of the submitted crash reports on the <i>about:crashes</i> page.
    You can open the <b>about:crashes</b> page via the location bar, like you open a website.
    See:
    *http://kb.mozillazine.org/Breakpad (Mozilla Crash Reporter)
    *https://support.mozilla.com/kb/Mozilla+Crash+Reporter
    *https://developer.mozilla.org/en/How_to_get_a_stacktrace_for_a_bug_report

Maybe you are looking for