Hallo!! Hab eine Tabelle erstellt und nun ist die Höhe der Tabelle wie ein quadrat ich will aber nach der tabelle das leere feld weg haben!!bitte hilft mir!!
Code:
package table;
import javax.swing.*;
public class SimpleTable
{
public static void main( String args[] )
{
String rowData[][] = {
{ "Japan", "245" }, { "USA", "240" }, { "Italien", "220" },
{ "Spanien", "217" }, {"Türkei", "215"} ,{"England", "214"},
{ "Frankreich", "190" }, {"Griechenland", "185" },
{ "Deutschland", "180" }, {"Portugal", "170" }
};
String columnNames[] = {
"Land", "Durchschnittliche Sehdauer pro Tag in Minuten"
};
JTable table = new JTable( rowData, columnNames );
JFrame frame = new JFrame();
frame.getContentPane().add( new JScrollPane(table) );
frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
frame.pack();
frame.setVisible( true );
}
}