[vtkusers] vtkPanel on osx

Anastasia Mironova mironova at sci.utah.edu
Mon Jun 26 18:09:38 EDT 2006


I am having trouble making a vtkPanel within a javax.swing 
JFrame on a MacBook Pro. It works without a single error 
message on a linux build... please help.

Here is the code I run:

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.border.*;
import vtk.*;

  * An application that displays a JButton and several 
  * The JRadioButtons determine the look and feel used by 
the application.
public class SimpleFrame extends JFrame{
   private vtkPanel mypanel;
   public SimpleFrame() {
	mypanel = new vtkPanel();
	mypanel.GetRenderer().SetBackground(1, 1, 1);
	vtkConeSource cone = new vtkConeSource();
     vtkPolyDataMapper coneMapper = new 

     vtkActor coneActor = new vtkActor();


     getContentPane().add(mypanel, BorderLayout.CENTER);

   public static void main(String s[]) {
     (new SimpleFrame()).setVisible(true);

Here are the errors I get:
java SimpleFrame
2006-06-26 16:59:37.445 java[10384] CFLog (0): 
CFMessagePort: bootstrap_register(): failed 1103 (0x44f), 
port = 0x10503, name = 'java.ServiceProvider'
See /usr/include/servers/bootstrap_defs.h for the error 
2006-06-26 16:59:37.446 java[10384] CFLog (99): 
CFMessagePortCreateLocal(): failed to name Mach port 
Exception in thread "AWT-AppKit" JavaAWT: Assertion 
failure: Java exception thrown
JavaAWT: File 
src/macosx/native/apple/awt/util/AWTException.m; Line 40
JavaAWT: Assertion failure: _javaException
JavaAWT: File 
src/macosx/native/apple/awt/util/AWTException.m; Line 48
2006-06-26 16:59:41.329 java[10384] Exception raised 
during posting of notification.  Ignored.  exception: See 
Java exception object

What happens is that the frame appears and so does the 
vtkPanel but it freezes immediately and does not respond 
to anything. I would greatly appreciate any advice on how 
to fix this.


More information about the vtkusers mailing list