Results 1 to 4 of 4
Thread: passing parameters to paint mtd
- 06-27-2008, 08:37 AM #1Member
- Join Date
- Mar 2008
- Rep Power
passing parameters to paint mtd
I have placed several applets on my web page and I able to pass parameters among them the problem is one applet is drawing some lines, I want to pass parameters to the paint method so as it updates the drawn lines to the new cordinate points specified by the requesting applet, I mean it should be dynamic but as I understand paint is called after init so how do I manage to keep on redrawing the lines as per the parameters passed.The dream of being a legend has just begun!
- 06-27-2008, 04:36 PM #2
Call the repaint() method when you want the jvm to call the paint() method.
Put the parameters somewhere the paint() method can see them.
Last edited by Norm; 06-27-2008 at 04:43 PM.
- 07-14-2008, 07:34 PM #3
Invoke Later () the established practice. This allows the system to schedule the repaint and return to code provided by application. It is needful that calls to paint() be Idempotent and be scheduled by the JVM.
To do as seems obvious in code results in sluggish display that sometimes hangs.Introduction to Programming Using Java.
Cybercartography: A new theoretical construct proposed by D.R. Fraser Taylor
- 07-14-2008, 08:15 PM #4
- By veena1612 in forum Java AppletsReplies: 1Last Post: 05-27-2008, 09:29 AM
- By DonCash in forum EclipseReplies: 2Last Post: 04-08-2008, 04:46 PM
- By java_to_c in forum New To JavaReplies: 0Last Post: 01-31-2008, 08:49 PM
- By reddzer in forum Java ServletReplies: 0Last Post: 11-10-2007, 04:47 PM
- By goldhouse in forum Java 2DReplies: 1Last Post: 07-17-2007, 03:43 AM