[vtkusers] VTK problems with Java on Gentoo Linux

Sebastien Jourdain sebastien.jourdain at kitware.com
Thu Aug 5 17:44:40 EDT 2010


Hi Knut,

One reason could be that you are not building all the swing and VTK
object inside the EDT (event dispatch thread)

public static void main(String[] args) {
   SwingUtility.invokeLater(
       new Runnable() {
            public void run() {
                   .... your main content ...
            }
       }
   );
}

As I just write it in the mail, use your IDE completion to fix typo...

Moreover, instead of doing a pack (mainWindow.pack();) you should set
a fix sized...

Another thing, you do not need your static block if the first vtk
object you create is the vtkPanel... In fact the vtkPanel class has
the exact same static block.

Seb

On Tue, Aug 3, 2010 at 7:12 PM, Knut Krause <knut.krause at lagom.de> wrote:
> Hi there,
>
> I just tried to run a little code example on my linux system and during the
> render process the application always crashes. I will include the Code and the
> error as a pastebin link. Got anyone an idea what's going wrong here?
> Java JRE is Sun Java 1.6.0.20 VTK version is 5.6.0. I compiled both from
> source. This is and amd64 system.
>
> Regards
>
>
> Knut
>
> Code: http://paste.pocoo.org/show/245526/
> Error: http://paste.pocoo.org/show/245527/
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>



More information about the vtkusers mailing list