The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
August 2000

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

Java Graphics won't paint()

Posted by Liam Gibbs on August 01, 2000 at 2:24 PM

Hey everyone,

I hope to be getting an answer to this very soon because it seems to be very hard and I'd like to get it done.

I have a client Java applet which connects to a server. The server is fine and I don't have any problems with it. It's the client I'm having trouble with.

It seems that the client applet does not want to repaint. I have some very simple graphics objects being placed on the screen: a small circle, some numbers, and a series of lines that make up a multicoloured rectangle by way of a for...next loop. I also have a TextArea object. I have created my Panel to contain the TextArea, as well. But these things don't appear when the client connects to the server.

When the client doesn't connect, the graphics will show, but only when the applet finishes running. Until then, all I get is a blank gray applet.

But I've discovered the cause of the problem. Even though my applet is reaching the repaint() calls, it never goes into the paint() function. How do I know this? I have the paint() function send a message to the server as its first command. But that message never reaches the server.

Can anyone give me any possible clues? Is there some sort of security feature that disallows graphics? It seems unlikely, but I'm running out of answers quickly.

Thanks for any help. It's very much appreciated! Please, if at all possible, reply to my e-mail address with the answer (lgibbs@microlegend.com).

Liam Gibbs



Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us