Talk:HelloWorldWindJavaSDK

First off, thanks for the tutorial. I'm trying to use it to get World Wind Java 1.2.0 compilable in Netbeans 7.1.1. All the steps seem to work, and the code seems to compile (sort of) but I get the following error when I try to run it:


Exception in thread "AWT-EventQueue-0" java.lang.RuntimeException: Uncompilable source code - Erroneous tree type: <any> at WorldWindNBMain.initComponents(WorldWindNBMain.java:39) at WorldWindNBMain.<init>(WorldWindNBMain.java:19) at WorldWindNBMain$1.run(WorldWindNBMain.java:88) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:705) at java.awt.EventQueue.access$000(EventQueue.java:101) at java.awt.EventQueue$3.run(EventQueue.java:666) at java.awt.EventQueue$3.run(EventQueue.java:664) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:675) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105) at java.awt.EventDispatchThread.run(EventDispatchThread.java:90) BUILD SUCCESSFUL (total time: 7 seconds

I assume this is a runtime error as it seems to compile when I just build instead of run, but I'm not sure. If I go to the offending line 39 at WorldWindNBMain.initComponents(WorldWindNBMain.java:39) The tip is red and it says: no suitable method found for addComponent(gov.nasa.worldwind.awt.WorldWindowGLCanvas,int,int,short) method javax.swing.GroupLayout.ParallelGroup.addComponent(java.awt.Component,javax.swing.GroupLayout.Alignment,int,int,int) is not applicable (actual and formal argument lists differ in length)

Any idea how to fix this? Looks to me like the construtor needs tweaked possibly. Looks to me like its trying to use (java.awt.Component,javax.swing.GroupLayout.Alignment,int,int,int) instead of (gov.nasa.worldwind.awt.WorldWindowGLCanvas,int,int,short) for the argument list for addComponent. So it seems to be missing the groupLayout alignment parameter possibly (and/or possibly the int vs short difference)?

I'm new to JAVA so my appologies if the problem is obvious.

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo