Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-27-2008, 10:37 AM
Member
 
Join Date: Mar 2008
Posts: 20
themburu is on a distinguished road
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!
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 06-27-2008, 06:36 PM
Norm's Avatar
Senior Member
 
Join Date: Jun 2008
Location: Heredia, Costa Rica
Posts: 2,223
Norm is on a distinguished road
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 06:43 PM.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 07-14-2008, 09:34 PM
Nicholas Jordan's Avatar
Senior Member
 
Join Date: Jun 2008
Location: Southwest
Posts: 783
Nicholas Jordan is on a distinguished road
java.lang.Runnable
Quote:
Originally Posted by Norm View Post
Call the repaint() method when you want the jvm to call the paint() method....
There are sysem issues that make contemporary practice to utilize: 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.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
.
Cybercartography: A new theoretical construct proposed by D.R. Fraser Taylor
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 07-14-2008, 10:15 PM
Norm's Avatar
Senior Member
 
Join Date: Jun 2008
Location: Heredia, Costa Rica
Posts: 2,223
Norm is on a distinguished road
I haven't seen that. Do you mean the instead of calling repaint() directly from your code, you should call repaint() inside of an invokeLater(...) method call?
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
passing parameters between two applets veena1612 Java Applets 1 05-27-2008 11:29 AM
[SOLVED] Passing parameters in Eclipse DonCash Eclipse 2 04-08-2008 06:46 PM
JNI - passing and returning parameters by value java_to_c New To Java 0 01-31-2008 10:49 PM
is synchronization on method passing local variables as parameters needed reddzer Java Servlet 0 11-10-2007 06:47 PM
paint() and paintComponent() goldhouse Java 2D 1 07-17-2007 05:43 AM


All times are GMT +3. The time now is 07:40 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org