package outp.swing;
import java.awt.*;
import java.awt.event.*;
import java.net.*;
import java.io.*;
import java.applet.*;
import javax.swing.*;
import javax.swing.border.*;
import java.util.*;
import java.math.*;
import java.util.*;
import javax.swing.*;
import javax.swing.table.*;
public class jta implements da{
public jta(){
JTable jt=new JTable(new jtam(d4.DATA,d4.CS));
JFrame jf=new JFrame();
Container cp = jf.getContentPane();
cp.setCursor(new Cursor(Cursor.HAND_CURSOR));
jt.setCursor(new Cursor(Cursor.CROSSHAIR_CURSOR));
jt.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
jt.setColumnSelectionAllowed(true);
jt.setCellSelectionEnabled(true);
jt.setRowSelectionAllowed(true);
jt.setDefaultRenderer(Object.class,new detr());
cp.add(new JScrollPane(jt), BorderLayout.CENTER);
jf.setVisible(true);
jf.pack();
jf.addWindowListener(new Bild.WindowClosingAdapter(true));
}
public static void main(String[] args){
new jta();
}
}
class jtcm extends DefaultTableColumnModel{
public Class getColumnClass(int columnIndex)
{
return JButton.class;
}
}
class jtam extends DefaultTableModel
{
public Class getColumnClass(int columnIndex)
{
return JButton.class;
}
public jtam(Object[][] d,Object[] cn){
super(d,cn);
}
}
class detr extends DefaultTableCellRenderer{
public Component getTableCellRendererComponent(
JTable table, Object value, boolean isSelected,
boolean hasFocus,
int row,
int column
){
return (JButton) value;
}
}
class da4{
{
for(int i1=0;i1<3;i1++){
for(int i2=0;i2<3;i2++){
DATA[i1][i2]=new JButton("sdf");
}
}
}
public static final JButton[][] DATA=new JButton[3][3];
public static final String[] CS={"1r","sd","sd",};
}