Hello, Thanks for sending the code...
> i am pasting here the complete code .. In this file i m trying to add a > point layer on > click of the Viewdata button.. but the point is not added on button click.. > instead it gets > added on clicking reset button..i hope you can see the problem.. I just compiled and ran your program using the "countries" shapefile as test data (from http://udig.refractions.net/files/docs/data-v1_1.zip). When I click the Viewdata button a blue dot appears on the map. When I zoom in and out in the neighbourhood of the blue dot it appears to be displayed properly. I think this is what you wanted to happen - yes ? I'm not sure why you are seeing different and incorrect behaviour. I know that we are working on different platforms: I'm using Mac OSX whereas I think you are using Windows (?) - but that shouldn't cause this problem. I used GeoTools version 8.3 - what version are you using ? What is meant to happen, and does when I run the program, is that when your new Layer is added to the MapContent, a "layer added" event is sent from the MapContent instance to listeners, one of which is the JMapPane. The map pane responds to the event by repainting. I don't see anything in your code that would modify or block that event processing. Sorry, I'm not sure what to suggest right now but will let you know if I have any ideas. Michael ------------------------------------------------------------------------------ Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery and much more. Keep your Java skills current with LearnJavaNow - 200+ hours of step-by-step video tutorials by Java experts. SALE $49.99 this month only -- learn more at: http://p.sf.net/sfu/learnmore_122612 _______________________________________________ GeoTools-GT2-Users mailing list GeoTools-GT2-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users