Java:
import javax.swing.*;
public class punkt
{
public static void main( String[] args )
{
String[][] rowData = {
{ "Spiel1", "" }, { "Spiel2", "" }, { "Spiel3", "" },
{ "Spiel4", "" }, {"Spiel5", ""} ,{ "Spiel6", "" },
{ "Spiel7", "" }, {"Spiel8", "" },
{ "", "" }, {"Gesamt", "" }
};
String[] columnNames = {
"Mannschaft1", "Mannschaft", "Mannschaft1", "Mannschaft"
};
JFrame f = new JFrame();
f.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
JTable table = new JTable( rowData, columnNames );
f.add( new JScrollPane(table) );
f.pack();
f.setVisible( true );
}
}
warum funktioniert das nicht. ich hätte eig. gerne 10 columns. ist dies nicht möglich. sorry bin totaler neuling