[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

AWT Applet Scroll Problem

Posted on 2002-07-26
6
Medium Priority
?
762 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
[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
6 Comments
 
LVL 16

Expert Comment

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

Accepted Solution

by:
gingiGuy earned 400 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
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 about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
The viewer will learn how to implement Singleton Design Pattern in Java.
Suggested Courses

656 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