Solved

why does paint(Graphics g) in my applet not do it's job at startup?

Posted on 2002-04-01
2
235 Views
Last Modified: 2010-03-31
hi,

i'm programing an applet using jdk 1.3 and no swing, but awt classes.

in a panel i use the paint(Graphics g) method to paint some lines etc. to form "tabs" at the top of the applet.

when i first load the applet, these tabs are not being displayed. but when i drag some other window (e.g. other browser window) over the applet and away again the tabs are being painted suddenly.

this happens when using netscape 4.78 & java-plugin 1.3.1

can anyone tell me how i get the applet to paint these tabs straight away at the beginning?!

thanx for your help.

dominik

here's my applet : http://www.getinvolved.unizh.ch/glossar/dev/
0
Comment
Question by:dom_bus
[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 Comments
 
LVL 9

Accepted Solution

by:
Venci75 earned 50 total points
ID: 6910202
use
repaint()
in your init() method.
0
 

Author Comment

by:dom_bus
ID: 6910233
hi Venci75,

just adding repaint to the init() method didn't work for my, but that was because i obviousely had to repaint all my panels as well.

so i added  mypanel1.repaint(); mypanel2.repaint(); mypanel3.repaint(); etc. to the init() of my applet. now it works.

thanx a lot for the hint!

dominik
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

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…
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 one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

717 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