?
Solved

refreshing a canvas in an applet.

Posted on 2002-06-19
2
Medium Priority
?
415 Views
Last Modified: 2006-11-17
Hi,
 I am working on a project which opens a Frame from within an applet.WHenever I draw an image  and another  window covers the image in the canvas, the image disappears and I have to click drawPlat(bal/unbal) again to get it back. I am trying very hard but could not find a Solution. I will really appreciate any helps.

The URL is:
http://www.cse.sc.edu/~group8/beta6/

The java file is:
http://www.cse.sc.edu/~group8/beta6/SurveyApp.java

Please help me and I will greatlt appreciate .

Note: I am supposed to use just basic Java.

Thanks
0
Comment
Question by:Alfred_here
[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
  • 2
2 Comments
 
LVL 92

Expert Comment

by:objects
ID: 7094350
Sounds like your not painting the image in the components paint() method. The paint() method is called whenever part of a component is required to be redrawn so all painting should be performed in the is method.

0
 
LVL 92

Accepted Solution

by:
objects earned 450 total points
ID: 7094359
Painting of your FCanvas object is done from a seperate component. You should instead be handing the painting inside the FCanvas class:

class FCanvas extends Canvas{
     FCanvas(){
          super();
     }
     public void paint(Graphics g){
         // paint calls should in here
     }
}
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

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…
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…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Suggested Courses
Course of the Month7 days, 23 hours left to enroll

765 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