....
//////////////qui riempio al table con i file presenti nell'unita a://
File q[]=dischetto.listFiles();
for( i=0;i<q.length;i++){
x=i;}
++x;
int y=4;
tabella = new JTable(x,y);
long Qfile;
int Dfile;
boolean DFfile;
String strfile;
for( i=0;i<x;i++){
Qfile =q[i].length();
DFfile =q[i].isFile();
if(DFfile==false)
{
strfile="Dir";
}
else
{
strfile="File";
}
tabella.setValueAt(""+q[i].getName(),i,0);
tabella.setValueAt(""+q[i].getAbsolutePath(),i,3);
Qfile = Qfile/1024;
tabella.setValueAt(""+Qfile,i,1);
tabella.setValueAt(""+strfile,i,2);
}
//////Qui ci metto un bello scroolll
JScrollPane jsp = new JScrollPane(tabella,JScrollPane.VERTICAL_SCROLLBAR _AS_NEEDED,JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEE DED);
//jsp.setLayout(flow_centerar);
jsp.setBounds(10,0,560,100);
row3.add(jsp);
pane.add(row3);
//////e il resto dopo di qui
Hola![]()