Hello Michael thanks for answer me.

I'm running and application that hold the Toolbar on JMapFrame like 
SelectionLab.java and the problem happens with any shapefile. My own 
shapefile and all shapeFile I've dowloaded from your site for the tutorial 
for example countries.shp references on ImageLab tutorial for Udig sample 
dataset.

I think it's happens when i use this lines in my code :

map.addLayer(layer);
mapFrame = new JMapFrame(map);
mapFrame.enableToolBar(true);   <----- the line that produce the problem (in 
my opinion)
mapFrame.enableStatusBar(true);

Regards,

Ludji

--------------------------------------------------
From: "Michael Bedward" <[email protected]>
Sent: Wednesday, July 27, 2011 2:59 AM
To: "Ludji ATHENES" <[email protected]>
Cc: <[email protected]>
Subject: Re: [Geotools-gt2-users] problem using JMapFrame and ToolBar

> Hello Ludji,
>
> I just tried running the Quickstart example using GeoTools version
> 8.0-SNAPSHOT but can't reproduce this error. I guess there is a bug in
> the MapViewport class which only occurs with some data.
>
> Can you tell me what tutorials you were using please and if the
> problem happens with any shapefile or only with some. If you are using
> your own data, please send me a small sample (off list) that provokes
> the problem.
>
> Michael
>
>
> On 27 July 2011 00:40, Ludji ATHENES <[email protected]> wrote:
>> Hello,
>> Excuse for my previous message but a bad manipulation send the message
>> before i write it all.
>> here is my broblem :
>> I use Eclipse and try your tutorial and now i have something strange in 
>> the
>> examples.
>>
>> When i tried the Maptoolbar class i' ve gat an exception but the app 
>> still
>> working. And when i run it on debugger mode no Exception. I paste the
>> exception bellow :
>>
>> Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
>>  at java.awt.geom.AffineTransform.<init>(AffineTransform.java:471)
>>  at org.geotools.map.MapViewport.getScreenToWorld(MapViewport.java:351)
>>  at 
>> org.geotools.swing.JMapPane.getScreenToWorldTransform(JMapPane.java:785)
>>  at
>> org.geotools.swing.tool.MapToolManager.convertEvent(MapToolManager.java:200)
>>  at
>> org.geotools.swing.tool.MapToolManager.mouseEntered(MapToolManager.java:154)
>>  at 
>> java.awt.AWTEventMulticaster.mouseEntered(AWTEventMulticaster.java:283)
>>  at 
>> java.awt.AWTEventMulticaster.mouseEntered(AWTEventMulticaster.java:282)
>>  at java.awt.Component.processMouseEvent(Component.java:6298)
>>  at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
>>  at java.awt.Component.processEvent(Component.java:6054)
>>  at java.awt.Container.processEvent(Container.java:2041)
>>  at java.awt.Component.dispatchEventImpl(Component.java:4652)
>>  at java.awt.Container.dispatchEventImpl(Container.java:2099)
>>  at java.awt.Component.dispatchEvent(Component.java:4482)
>>  at 
>> java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
>>  at 
>> java.awt.LightweightDispatcher.trackMouseEnterExit(Container.java:4366)
>>  at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4220)
>>  at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
>>  at java.awt.Container.dispatchEventImpl(Container.java:2085)
>>  at java.awt.Window.dispatchEventImpl(Window.java:2478)
>>  at java.awt.Component.dispatchEvent(Component.java:4482)
>>  at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:644)
>>  at java.awt.EventQueue.access$000(EventQueue.java:85)
>>  at java.awt.EventQueue$1.run(EventQueue.java:603)
>>  at java.awt.EventQueue$1.run(EventQueue.java:601)
>>  at java.security.AccessController.doPrivileged(Native Method)
>>  at
>> java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
>>  at
>> java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
>>  at java.awt.EventQueue$2.run(EventQueue.java:617)
>>  at java.awt.EventQueue$2.run(EventQueue.java:615)
>>  at java.security.AccessController.doPrivileged(Native Method)
>>  at
>> java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
>>  at java.awt.EventQueue.dispatchEvent(EventQueue.java:614)
>>  at
>> java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
>>  at
>> java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
>>  at
>> java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
>>  at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
>>  at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
>>  at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
>>
>> Can you explain what's going on ?
>> I use maven and work with 8-SNAPSHOT version
>>
>> Regards
>> Ludji
>>
>>
>> ------------------------------------------------------------------------------
>> Magic Quadrant for Content-Aware Data Loss Prevention
>> Research study explores the data loss prevention market. Includes 
>> in-depth
>> analysis on the changes within the DLP market, and the criteria used to
>> evaluate the strengths and weaknesses of these DLP solutions.
>> http://www.accelacomm.com/jaw/sfnl/114/51385063/
>> _______________________________________________
>> Geotools-gt2-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>>
> 

------------------------------------------------------------------------------
Got Input?   Slashdot Needs You.
Take our quick survey online.  Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to