Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

diffirent behaviour between IE40  and Navigator 404

Posted on 1998-06-28
2
159 Views
Last Modified: 2010-03-30
SDK 1.01
Development platform Win95
I write some code :import java.applet.*;
import java.awt.*;

public class j2 extends Applet
{
      Button bt=new Button("Quit");
      TextArea ta=new TextArea(" ");
           public void init()
      {
       
              add(bt);
              add(ta);
                  resize(420, 240);
      }

      public boolean handleEvent(Event evt)
      {
      switch(evt.id)
      {
      case Event.MOUSE_DOWN :
            if(evt.metaDown())
             ta.appendText("Mouse right down\r\n");
            else
             ta.appendText("Mouse down\r\n");
      return true;
      default :
            return false;
      }
}


}
in Navigator when I click right button at anywhere in the applet a property sheet and a string "Mouse right down" appear (it mean I can handle that event)
but in IE40 if I click right button on "Quit" button or on text area string "Mouse right down " doesn't appear .
what wrong with my code ?
Thanks in advance.
0
Comment
Question by:tungsim
2 Comments
 

Author Comment

by:tungsim
ID: 1223918
Edited text of question
0
 
LVL 1

Accepted Solution

by:
rprice032897 earned 50 total points
ID: 1223919
tungsim,

Check your IE4 settings.  I compiled this (JDK 1.1.6), put it on a page and it ran fine in IE4 (ver. 4.72.2106.8).

You do, however, need to update the deprecated methods in the applet.

appendText is now append.

handleEvent has also been deprecated with the changes to the 1.1 event model.  The JDK docs tell how to convert.

The applet does indeed run well on IE4, so I would look toward browser/machine/system settings for an answer.

Rick Price
r_price@mailexcite.com
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
session migration servlets 2 42
Arrays.asList  VS  ArrayList 4 71
Java syntax, or is it Selenium 6 30
hashmap order 17 37
For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
This video teaches viewers about errors in exception handling.

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question