@@ -0,0 +1,2317 @@
+import java.awt.BorderLayout;%0Aimport java.awt.event.ActionEvent;%0Aimport java.awt.event.ActionListener;%0A%0Aimport javax.swing.JButton;%0Aimport javax.swing.JFrame;%0Aimport javax.swing.JPanel;%0Aimport javax.swing.SwingUtilities;%0A%0Aimport vtk.vtkLight;%0Aimport vtk.vtkLightActor;%0Aimport vtk.vtkNativeLibrary;%0Aimport vtk.vtkPanel;%0A%0A%0Apublic class LightActor extends JPanel implements ActionListener %7B%0A%09  private static final long serialVersionUID = 1L;%0A%09  private vtkPanel renWin;%0A%09  private JButton exitButton;%0A%0A%09  // -----------------------------------------------------------------%0A%09  // Load VTK library and print which library was not properly loaded%0A%09  static %7B%0A%09    if (!vtkNativeLibrary.LoadAllNativeLibraries()) %7B%0A%09      for (vtkNativeLibrary lib : vtkNativeLibrary.values()) %7B%0A%09        if (!lib.IsLoaded()) %7B%0A%09          System.out.println(lib.GetLibraryName() + %22 not loaded%22);%0A%09        %7D%0A%09      %7D%0A%09    %7D%0A%09    vtkNativeLibrary.DisableOutputWindow(null);%0A%09  %7D%0A%09  // -----------------------------------------------------------------%0A%09  %0A%09  %0A%09  public LightActor() %7B%0A%09    super(new BorderLayout());%0A%0A    %09 // Display where the light is  %0A%09  vtkLight Light = new vtkLight();%0A%09  Light.SetPositional(1);%0A%09  %0A%09  vtkLightActor LightActor = new vtkLightActor();%0A%09  LightActor.SetLight(Light);%0A %0A%09  renWin = new vtkPanel();%0A%09  renWin.GetRenderer().AddActor(LightActor);%0A%09  renWin.GetRenderer().AddViewProp(LightActor);%0A%09  renWin.resetCamera();%0A%09 %0A%0A%09  // Add Java UI components%0A%09  exitButton = new JButton(%22Exit%22);%0A%09  exitButton.addActionListener(this);%0A%0A%09  add(renWin, BorderLayout.CENTER);%0A%09  add(exitButton, BorderLayout.SOUTH);%0A%09  %7D%0A%0A%09  /** An ActionListener that listens to the button. */%0A%09  public void actionPerformed(ActionEvent e) %7B%0A%09    if (e.getSource().equals(exitButton)) %7B%0A%09      System.exit(0);%0A%09    %7D%0A%09  %7D%0A%0A%09  public static void main(String s%5B%5D) %7B%0A%09    SwingUtilities.invokeLater(new Runnable() %7B%0A%09      public void run() %7B%0A%09        JFrame frame = new JFrame(%22Light Actor%22);%0A%09        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);%0A%09        frame.getContentPane().setLayout(new BorderLayout());%0A%09        frame.getContentPane().add(new LightActor(), BorderLayout.CENTER);%0A%09        frame.setSize(400, 400);%0A%09        frame.setLocationRelativeTo(null);%0A%09        frame.setVisible(true);%0A%09      %7D%0A%09    %7D);%0A%09  %7D%0A%09%7D %0A

Create LightActor.java