@@ -0,0 +1,2622 @@
+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.vtkActor;%0Aimport vtk.vtkNativeLibrary;%0Aimport vtk.vtkPanel;%0Aimport vtk.vtkPolyDataMapper;%0Aimport vtk.vtkDiskSource;%0A%0A%0A%0A//Author: Bharatesh Chakravarthi%0A//Affiliation: VE Lab, Chung Ang University, Seoul, South Korea. %0A%0A%0Apublic class Disk extends JPanel implements ActionListener %0A%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 %0A%09  %7B%0A%09    if (!vtkNativeLibrary.LoadAllNativeLibraries()) %0A%09%09%7B%0A%09      for (vtkNativeLibrary lib : vtkNativeLibrary.values()) %0A%09%09  %7B%0A%09        if (!lib.IsLoaded()) %0A%09%09%09%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 Disk() %0A%09  %7B%0A%09    %0A%09%09%09super(new BorderLayout());%0A%0A%09%09  //Create a Disk%0A%09%09  vtkDiskSource Disk = new vtkDiskSource();%0A%09%09  %0A%09 %0A%09%09  //Create a Mapper and Actor%0A%09%09  vtkPolyDataMapper Mapper = new vtkPolyDataMapper();%0A%09%09  Mapper.SetInputConnection(Disk.GetOutputPort());%0A%0A%09%09  vtkActor Actor = new vtkActor();%0A%09%09  Actor.SetMapper(Mapper);%0A%09%09  Actor.GetProperty().SetColor(1.0, 1.0, 0.5);  %0A%09%09   %0A%09%09  renWin = new vtkPanel();%0A%09%09  renWin.GetRenderer().AddActor(Actor);%0A%09%09  renWin.GetRenderer().SetBackground(0.1, 0.0, 0.1);%0A%09%09  renWin.resetCamera();%0A%0A%09%09  // Add Java UI components%0A%09%09  exitButton = new JButton(%22Exit%22);%0A%09%09  exitButton.addActionListener(this);%0A%0A%09%09  add(renWin, BorderLayout.CENTER);%0A%09%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) %0A%09  %7B%0A%09    if (e.getSource().equals(exitButton)) %0A%09%09%7B%0A%09      System.exit(0);%0A%09    %7D%0A%09  %7D%0A%0A%09  public static void main(String s%5B%5D) %0A%09  %7B%0A%09    SwingUtilities.invokeLater(new Runnable() %0A%09%09%7B%0A%09      public void run() %0A%09%09  %7B%0A%09        JFrame frame = new JFrame(%22Disk%22);%0A%09        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);%0A%09        frame.getContentPane().setLayout(new BorderLayout());%0A%09        frame.getContentPane().add(new Disk(), 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%7D%0A

Create Disk.java