import vtk.vtkActor;
import vtk.vtkSphereSource;
import vtk.vtkNativeLibrary;
import vtk.vtkPolyDataMapper;
import vtk.vtkRenderView;
import vtk.vtkNamedColors;

public class RenderView
{
	// -----------------------------------------------------------------
	// Load VTK library and print which library was not properly loaded
	static 
	{
		if (!vtkNativeLibrary.LoadAllNativeLibraries()) 
		{
			for (vtkNativeLibrary lib : vtkNativeLibrary.values()) 
			{
				if (!lib.IsLoaded()) 
				{
					System.out.println(lib.GetLibraryName() + " not loaded");
				}
			}
		}
		vtkNativeLibrary.DisableOutputWindow(null);
	}
	// -----------------------------------------------------------------
		
	public static void main(String s[]) 
	{					
		vtkNamedColors colors = new vtkNamedColors();

    //For Actor Color
    double actorColor[] = new double[4];
    //Renderer Background Color
    double Bgcolor[] = new double[4];
        
    colors.GetColor("Crimson", actorColor);
    colors.GetColor("MidnightBlue", Bgcolor);
        
		//Create a Sphere
		vtkSphereSource Sphere = new vtkSphereSource();
		Sphere.SetCenter(0.0,0.0,0.0);
		Sphere.SetRadius(1.0);
		Sphere.Update();
		
		//Create a Mapper and Actor
		vtkPolyDataMapper Mapper = new vtkPolyDataMapper();
		Mapper.SetInputConnection(Sphere.GetOutputPort());
		
		vtkActor Actor = new vtkActor();
		Actor.SetMapper(Mapper);
		Actor.GetProperty().SetColor(actorColor);
		
		vtkRenderView RenderView = new vtkRenderView();
		RenderView.SetInteractionModeTo3D();
		RenderView.GetRenderer().AddActor(Actor);
		RenderView.GetRenderer().SetBackground(Bgcolor);
		RenderView.Update();

		RenderView.ResetCamera();
		RenderView.GetInteractor().Start();
	}		  
}

@@ -181,17 +181,18 @@
 rView%0A%7B%0A
-%09
+  
 // -----
@@ -252,17 +252,18 @@
 -------%0A
-%09
+  
 // Load 
@@ -326,17 +326,18 @@
 ded%0A
-%09
+  
 static %0A
 %09%7B%0A%09
@@ -332,21 +332,24 @@
 static %0A
-%09%7B%0A%09%09
+  %7B%0A    
 if (!vtk
@@ -389,23 +389,28 @@
 ies()) %0A
-%09%09%7B%0A%09%09%09
+    %7B%0A      
 for (vtk
@@ -457,25 +457,32 @@
 ues()) %0A
-%09%09%09%7B%0A%09%09%09%09
+      %7B%0A        
 if (!lib
@@ -499,19 +499,28 @@
 )) %0A
-%09%09%09%09%7B%0A%09%09%09%09%09
+        %7B%0A          
 Syst
@@ -577,25 +577,36 @@
 %22);%0A
-%09%09%09%09%7D%0A%09%09%09%7D%0A%09%09%7D%0A%09%09
+        %7D%0A      %7D%0A    %7D%0A    
 vtkN
@@ -649,12 +649,13 @@
 l);%0A
-%09%7D%0A%09
+  %7D%0A 
 // -
@@ -722,17 +722,18 @@
 ----%0A%09%09%0A
-%09
+  
 public s
@@ -765,18 +765,20 @@
 %5D) %0A
-%09
+  
 %7B%09%09%09%09%09%0A
-%09%09
+   
 vtkN
@@ -819,18 +819,16 @@
 lors();%0A
-%0A 
    //For
@@ -836,25 +836,24 @@
 Actor Color%0A
- 
    double ac
@@ -883,17 +883,16 @@
 %5B4%5D;%0A   
- 
 //Render
@@ -911,17 +911,16 @@
 d Color%0A
- 
    doubl
@@ -952,18 +952,8 @@
 4%5D;%0A
-        %0A 
    c
@@ -991,17 +991,16 @@
 Color);%0A
- 
    color
@@ -1045,18 +1045,19 @@
        %0A
-%09%09
+   
 //Create
@@ -1066,18 +1066,19 @@
  Sphere%0A
-%09%09
+   
 vtkSpher
@@ -1117,18 +1117,19 @@
 urce();%0A
-%09%09
+   
 Sphere.S
@@ -1147,26 +1147,27 @@
 0,0.0,0.0);%0A
-%09%09
+   
 Sphere.SetRa
@@ -1177,18 +1177,19 @@
 s(1.0);%0A
-%09%09
+   
 Sphere.U
@@ -1200,18 +1200,19 @@
 e();%0A%09%09%0A
-%09%09
+   
 //Create
@@ -1231,18 +1231,19 @@
 d Actor%0A
-%09%09
+   
 vtkPolyD
@@ -1286,18 +1286,19 @@
 pper();%0A
-%09%09
+   
 Mapper.S
@@ -1343,18 +1343,19 @@
 ());%0A%09%09%0A
-%09%09
+   
 vtkActor
@@ -1379,18 +1379,19 @@
 ctor();%0A
-%09%09
+   
 Actor.Se
@@ -1407,18 +1407,19 @@
 apper);%0A
-%09%09
+   
 Actor.Ge
@@ -1455,18 +1455,19 @@
 or);%0A%09%09%0A
-%09%09
+   
 vtkRende
@@ -1502,26 +1502,27 @@
 nderView();%0A
-%09%09
+   
 RenderView.S
@@ -1542,26 +1542,27 @@
 ModeTo3D();%0A
-%09%09
+   
 RenderView.G
@@ -1587,26 +1587,27 @@
 tor(Actor);%0A
-%09%09
+   
 RenderView.G
@@ -1643,18 +1643,19 @@
 color);%0A
-%09%09
+   
 RenderVi
@@ -1668,18 +1668,19 @@
 ate();%0A%0A
-%09%09
+   
 RenderVi
@@ -1697,18 +1697,19 @@
 mera();%0A
-%09%09
+   
 RenderVi
@@ -1735,18 +1735,23 @@
 Start();
+%09
 %0A%09
+%09%0A  
 %7D%09%09  %0A%7D%0A

Update RenderView.java