Solved

Applet doesn't update until resizing of Frame.

Posted on 1997-05-19
3
265 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
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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

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…
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
The viewer will learn how to implement Singleton Design Pattern in Java.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

705 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

18 Experts available now in Live!

Get 1:1 Help Now