Solved

AWT Applet Scroll Problem

Posted on 2002-07-26
6
738 Views
Last Modified: 2013-12-29

When the Applet's size is more than  the display size on the browser. User tends to use the scroll bar of the browser for better view of it.

 In doing so the repaint is not workinng properly & applet's display is getting distorted. This is noticed in IE 5.5 /6 on win 2k & XP machines
0
Comment
Question by:pvamsikris
6 Comments
 
LVL 16

Expert Comment

by:heyhey_
ID: 7183396
post URL for applet that reproduces the problem.
0
 

Accepted Solution

by:
gingiGuy earned 100 total points
ID: 7185011
This is a problem with AWT and Microsoft's Java Runtime Environement for Internet Explorer. This would most likely be fixed by using the Java Plugin by Sun ( availible from http://java.sun.com)(although i cant test it as i dont have your code).

However, i do appreciate that many people (including myself in most circumstances) prefer not to force users to install additional software (such as the JRE Plugin).

A possible solution might be to start a seperate thread from init(), in which you would call the repaint() method of any Panels, content pains, etc that are causing problems.

Hope this helps

Guy
0
 

Author Comment

by:pvamsikris
ID: 7190097

  What I am saying is that its happening if I have many controls in my Applet. If I have less controls its not the problem. Is it a known fact or is there some kind off workaround or some thing wrong in the code ?
0
 

Expert Comment

by:gingiGuy
ID: 7190307
Yea, its a known fact that MSIE and scrolling pages with applets on dont go well together. Sometimes you might be lucky, and a simple applet will work without a problem, however, more often than not, MSIE will not redraw the applet properly when you scroll.

This is sometimes fixed by calling the repaint() method of all of the panels, panes and any other visible (or invisible) objects. This is however, not a proven, reliable, or "nice" solution.
I have the same problem with an applet that is being used in my firm, it was on a static (non scrolling) page till recently, however, the page now scrolls (not under my control), and the applet looks very silly, sorta replicating itself ontop of itself as the page scrolls. This is so bad that we will have to remove the applet.
As i said before you could try calling repaint every second from within another thread :

(pseeudo code : )
Thread {
  while( true ) // Infinite loop {
    wait 1 second
    object1.repaint()
    object2.repaint()
    ...
    ...
    ...
    objectn.repaint()
  }
}

Hope this has been of some help to you.
Guy
0
 
LVL 35

Expert Comment

by:girionis
ID: 8952265
No comment has been added lately, so it's time to clean up this TA.

I will leave a recommendation in the Cleanup topic area that this question is:

- points to gingiGuy

Please leave any comments here within the
next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

girionis
Cleanup Volunteer
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
DO we need Java installed on a Windows PC and WHY ? 13 98
session migration servlets 2 26
more than one jdk and one jre 1 34
eclipse apache tomcat admin console 52 55
For customizing the look of your lightweight component and making it look lucid like it was made of glass. Or: how to make your component more Apple-ish ;) This tip assumes your component to be of rectangular shape and completely opaque. (COD…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
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…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

895 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

12 Experts available now in Live!

Get 1:1 Help Now