Ho una tabella JTable in cui imposto la dimensione della colonna come segue: table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); table.getColumnModel().getColumn(0).setPreferredWidth(27); table.getColumnModel().getColumn(1).setPreferredWidth(120); table.getColumnModel().getColumn(2).setPreferredWidth(100); table.getColumnModel().getColumn(3).setPreferredWidth(90); table.getColumnModel().getColumn(4).setPreferredWidth(90); table.getColumnModel().getColumn(6).setPreferredWidth(120); table.getColumnModel().getColumn(7).setPreferredWidth(100); table.getColumnModel().getColumn(8).setPreferredWidth(95); table.getColumnModel().getColumn(9).setPreferredWidth(40); table.getColumnModel().getColumn(10).setPreferredWidth(400); Funziona bene, ma quando la tabella è ingrandita, ottengo uno spazio vuoto a destra dell'ultima colonna. È possibile ridimensionare l'ultima colonna alla fine della finestra quando …
We use cookies and other tracking technologies to improve your browsing experience on our website,
to show you personalized content and targeted ads, to analyze our website traffic,
and to understand where our visitors are coming from.
By continuing, you consent to our use of cookies and other tracking technologies and
affirm you're at least 16 years old or have consent from a parent or guardian.