Solved

applet doesnt start until click(IE4.0)

Posted on 1998-06-22
5
234 Views
Last Modified: 2010-03-30
Why any applet doesnt start in IE4.0 (NT4.0), until I click in the applet area. In netscape all its ok. In the Init method of the applet I call requestFocus() and repaint.
Thanks.
0
Comment
Question by:wau
[X]
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
5 Comments
 
LVL 1

Expert Comment

by:ragnar
ID: 1223511
maybe you should show the source here, or give a link to the applet.
0
 

Author Comment

by:wau
ID: 1223512
ok. the link of my applet is http://members.xoom.com/lakes/Ilustr.html
but
public class Thing extends Applet
{
 public void init()
 {
  requestFocus();
  repaint();
 }
 public void paint(Graphics g)
 {
  g.drawString("I wont appear until click",10,10);
 }
}
wont display anything until I click in the applet area. This only happens in IE4.0(NT), not in Netscape(Mac/PC) and in IE3.0(Mac).
Why?
0
 
LVL 2

Accepted Solution

by:
aziz061097 earned 50 total points
ID: 1223513
I have a NT 4.0 and IE 4.0 . I ran the above applet and it worked perfectly fine. I did not have to click in the applet to get it working. repaint() tells the system that the applet needs to be redrawn. The browser responds by invoking the paint method of the applet the next time it has a moment , which is usually right away (but necessarily) . This means that if the browser is busy doing something else the paint method call could be delayed.
0
 

Expert Comment

by:cyrille
ID: 1223514
I had the same problem. repaint() doesn't seem to call the update function in IE4 (don't ask me why). However, I solved my problem by forcing the call to update().

Here's the protion of code I used:

init()
{
appletImg = createImage(maxWidth, maxHeight);
appletG = appletImg.getGraphics();
this.repaint();
update(appletG);
}
public void update(Graphics g)
{
paint(g);
}


0
 

Author Comment

by:wau
ID: 1223515
My applet seems to run well, when I update to Internet Explorer 4.x
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
eclipse apache tomcat admin console 52 156
ejb mdb examples 1 21
Is Applet the way to go for my drag and drop system? 8 36
hashmap order 17 43
An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

696 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