Salve a tutti.
Ho il seguente codice:
JTable Table = new JTable();
Table.setSize(100,300);
.
carica table
.
Box box1=Box.createVerticalBox();
JScrollPane js=new JScrollPane(Table );
box1.add(js);
js.add(Table);
box1.add(new JButton("gg"));
box1.add(new JButton("gg1"));
box1.add(new JButton("gg2"));
this.getContentPane().add(box1);
il problema è che il jscrollpane occupa quasi tutto il jFrame padre e non basta cambiargli la grandezza con setsize(w,h).
Come faccio ad assegnargli una grandezza minore?
grazie.