Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

applet doesnt start until click(IE4.0)

Posted on 1998-06-22
5
Medium Priority
?
240 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 100 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
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.
Suggested Courses

670 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