Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / January 2006

Tip: Looking for answers? Try searching our database.

repainting on mousepressed

Thread view: 
jimhartford@gmail.com - 27 Jan 2006 13:00 GMT
I set up a class that extends JFrame and implements MouseListener.  The
class displays  a graph, and when the graph is clicked with the mouse
it zooms into the spot that was clicked.    The problem is that the
method I call to zoom can have multiple frames, but when calling the
zoom method from the mousepressed method, only the last frame is ever
repainted.  When I call the same zoom method from main, each frame is
repainted fine.
Ian Shef - 31 Jan 2006 19:26 GMT
jimhartford@gmail.com wrote in news:1138366831.154819.182060
@f14g2000cwb.googlegroups.com:

> I set up a class that extends JFrame and implements MouseListener.  The
> class displays  a graph, and when the graph is clicked with the mouse
[quoted text clipped - 3 lines]
> repainted.  When I call the same zoom method from main, each frame is
> repainted fine.

I don't understand what it means for a method to have multiple frames.
I don't know what you mean by 'the last frame'.

Based on insufficent information, I suspect that you are abusing the Event
Dispatch Thread, but more information might help.

I think that we are going to see the code, or at least a short simple
compileable example.

Signature

Ian Shef     805/F6      *    These are my personal opinions    
Raytheon Company         *    and not those of my employer.
PO Box 11337             *
Tucson, AZ 85734-1337    *



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.