Solved

Applet doesn't update until resizing of Frame.

Posted on 1997-05-19
3
269 Views
Last Modified: 2012-05-04
I have an applet consisting of several panels. The bottom panel is a graph area and is added when a button is pushed. The problem is that when I add it, it only draws some of the lines I specified, and the panels aren't properly aligned. When I resize the Frame the applet is showing in, the entire thing is drawn and the panels align themselves. The same is the case if I run it in a browser, i.e. it only works properly AFTER I resize the browser.

I have tried repaint(), update(), and paint() on both the applet and the panels involved, but nothing changes.

Supplying the code is possible but will take a little work since I have to extract it from a larger context, but I'll do it if there is no other way.
0
Comment
Question by:bjoern
[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
3 Comments
 
LVL 6

Expert Comment

by:jpk041897
ID: 1220591
Have you tried repainting the container?
0
 
LVL 3

Accepted Solution

by:
garik earned 100 total points
ID: 1220592
Try to call validate() in the container your panels are in.
Browser resizing generates stop(), resize(), and start() sequence for the applet, and the call to resize() should initiate validates() for all container's layout managers.
If this doesn't help, then I'd like to see your code.
Good luck!

0
 

Author Comment

by:bjoern
ID: 1220593
Hmm, I thought I had tried that earlier, but apparantly I hadn't, coz now it works ;) Thanx
0

Featured Post

Technology Partners: 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
servlet and mdb, jms error 1 57
Is Applet the way to go for my drag and drop system? 8 35
Selenium docs api java index 3 66
web project error add remove 1 51
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
The viewer will learn how to implement Singleton Design Pattern in Java.

749 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