Solved

diffirent behaviour between IE40  and Navigator 404

Posted on 1998-06-28
2
155 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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This video teaches viewers about errors in exception handling.

759 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now