Ho un problema con la creazione della tabella, ho creato:

Il TableModel

codice:
import java.util.List;

import javax.swing.table.AbstractTableModel;

public class ListTableTableModel extends AbstractTableModel{
	
	List<Utente> list = null;
	String[] ColName = {"Nome", "Cognome",""}; 
	
	public ListTableTableModel(List<Utente> list) {
		this.list = list;
	}
	
	@Override
	public int getColumnCount() {
		return ColName.length;
	}

	@Override
	public int getRowCount() {
		return list.size();
	}

	@Override
	public Object getValueAt(int row, int col) {
		Utente utente = list.get(row);
		String val = null;
		switch (col) {
			case 0: val = getMaiuscoletto(utente.getNome()); break;
			case 1: val = getMaiuscoletto(utente.getCognome()); break;
			default: val = "";
			}
		return val; 
		}
	
	public String getColumnName(int col) {
		return ColName[col];
		}
	
	public boolean isCellEditable(int row, int col) {
		return false;
	}
	
	public static String getMaiuscoletto(String stringa){
		
	    String iniziale = stringa.substring(0, 1);
	    String finale = stringa.substring(1, stringa.length());
	    String retValue = iniziale.toUpperCase() + finale.toLowerCase();
		
		return retValue;
	}
}
e il JFrame

codice:
import java.awt.AWTEvent;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.Toolkit;

import javax.swing.*;

public class FrameGestioneUtenti extends JFrame {

	public JTable table;
	public static ListTableTableModel tableModel = new ListTableTableModel(Main.utenti);
	public JPanel principale = new JPanel();
	public JPanel tabella = new JPanel();
	public JPanel menu = new JPanel();
			
	public FrameGestioneUtenti(){
		
		super("Programma Calcolo Ore");
		
		ImageIcon icon = new ImageIcon("img/delete.png");
		
		Ascoltatore ascolt = new Ascoltatore(this);
		
		JButton deleteRow = new JButton(icon);
		deleteRow.setPreferredSize(new Dimension(24,24));
		deleteRow.addActionListener(ascolt);
		deleteRow.setActionCommand(ascolt.DELETE_ROW);
		deleteRow.setFocusPainted(false);
		
		Toolkit.getDefaultToolkit().addAWTEventListener(new PressioneTasto(this), AWTEvent.KEY_EVENT_MASK);
		
		menu.add(deleteRow);
		
		table = new JTable(tableModel);
		
		table.addMouseListener(new TableClickListener());
		
		setLayout(new BorderLayout());
		
		JScrollPane jScrollPane = new JScrollPane(table);
		
		tabella.add(jScrollPane);

		principale.add(table.getTableHeader());
		
		principale.add(tabella);
		
		table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
		table.getColumnModel().getColumn(0).setPreferredWidth(80);
		table.getColumnModel().getColumn(1).setPreferredWidth(80);
		table.getColumnModel().getColumn(2).setPreferredWidth(20);
		
		add(principale, BorderLayout.CENTER);
		
		add(menu, BorderLayout.NORTH);
		
		pack();
		
		setDefaultCloseOperation(EXIT_ON_CLOSE);
		
		setVisible(true);
	}
	
}
il risultato è questo:



Vorrei ridimensionare lo ScrollPane, o almeno sia quello che mi crea quell'area vuota e non permette alla finestra di essere di dimensioni "accettabili"

Grazie