	   import java.io.*;
	   import java.util.*;
	   import javax.swing.*;
       import javax.swing.table.*;
       import java.awt.*;
     public class JTableP extends JPanel
     {
	 private static final long serialVersionUID = 43567894L;
	 genelModel gm;  
	 JTable jt; 
	 public void kur(Object a[][],String baslik[])
	 {
	 gm=new genelModel(a,baslik); 	 
	 int n=a.length;
	 int m=a[0].length;
	 jt=new JTable(gm);	 
	 //jt.setPreferredScrollableViewportSize(new Dimension(500,80));
	 //jt.setFillsViewportHeight(true);
	 JScrollPane jat=new JScrollPane(jt);
     jat.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
     add(jat);
     }
     public void kur(Object a[][])
	 { int n=a[0].length;
	   String baslik[]=new String[n];
	   char b='\u0041';
       for(int i=0;i<n;i++)
       {baslik[i]=""+b;b++;}
       kur(a,baslik);
     }
         
     public JTableP(Object a[][],String baslik[])
     {kur(a,baslik);}
     	 
	 public JTableP(Object a[][])
	 { kur(a);}
	      
	 public JTableP(double b[][])
	 { Object a[][]=doubletoDouble(b);
	   kur(a);
	 }
	 public JTableP(double b[][],String baslik[])
	 { Object a[][]=doubletoDouble(b);
	   kur(a,baslik);
	 }
	 
	 public JTableP(int b[][])
	 { Object a[][]=inttoInteger(b);
	   kur(a);
	 }
	 
	 public JTableP(int b[][],String baslik[])
	 { Object a[][]=inttoInteger(b);
	   kur(a,baslik);
	 }
	 
	  
	 public static void print(Object a[][],String baslik[],String bb)
     {
	 JTableP pp=new JTableP(a,baslik);
     JFrame cerceve=new JFrame(bb);
     cerceve.addWindowListener(new BasicWindowMonitor());
     cerceve.getContentPane().add(pp);
     cerceve.pack();
     cerceve.setVisible(true);
	 }
	 
	 public static void print(Object a[][],String bb)
	 {  
	   int n=a[0].length;
	   String baslik[]=new String[n];
	   char b='\u0041';
       for(int i=0;i<n;i++)
       {baslik[i]=""+b;b++;}
       JTableP pp=new JTableP(a,baslik);
	   JFrame cerceve=new JFrame(bb);
       cerceve.addWindowListener(new BasicWindowMonitor());
       cerceve.getContentPane().add(pp);
       cerceve.pack();
       cerceve.setVisible(true);
	 }
	 
	 public static void print(Object a[][])
	 { 	   int n=a[0].length;
	   String baslik[]=new String[n];
	   char b='\u0041';
       for(int i=0;i<n;i++)
       {baslik[i]=""+b;b++;}
       JTableP pp=new JTableP(a,baslik);
	   JFrame cerceve=new JFrame("JTable");
       cerceve.addWindowListener(new BasicWindowMonitor());
       cerceve.getContentPane().add(pp);
       cerceve.pack();
       cerceve.setVisible(true);
	 }
	 	 
	 public static void print(double a[][],String baslik[],String bb)
	 {print(doubletoDouble(a),baslik,bb);}
	 public static void print(double a[][],String bb)
	 {print(doubletoDouble(a),bb);}
	 public static void print(double a[][])
	 {print(doubletoDouble(a));}  
	 public static void print(int a[][],String baslik[],String bb)
	 {print(inttoInteger(a),baslik,bb);} 
	 public static void print(int a[][],String bb)
	 {print(inttoInteger(a),bb);} 
	 public static void print(int a[][])
	 {print(inttoInteger(a));} 	    
	 public static Double[][] doubletoDouble(double xi[][])
     { int n=xi.length;
     int m=xi[0].length;
     Double X[][]=new Double[n][m];
     for(int j=0;j<m;j++)
       {for(int i=0;i<n;i++)
       {X[i][j]=new Double(xi[i][j]);}	  
       }
     return X;
     }    
     public static Integer[][] inttoInteger(int xi[][])
     { int n=xi.length;
     int m=xi[0].length;
     Integer X[][]=new Integer[n][m];
     for(int j=0;j<m;j++)
       {for(int i=0;i<n;i++)
       {X[i][j]=new Integer(xi[i][j]);}	  
       }
     return X;
    }
 
	 public static void main(String arg[])
	 {
	 double a[][]={{1.1,2.2,3.3,4.4},{4,4,5.5,6.6,7,7},{7,7,8.8,9.9,10.1},{10.1,11.2,12.3,13.4}};
	 print(a,"JTable örneği");
	 }
	 
	 }