JFileChooser filedlg = new JFileChooser();
filedlg.showOpenDialog(null);
File selected = filedlg.getSelectedFile();
textField.setText(selected.getName());
textField_1.setText(selected.length());
String fullName = selected.getAbsolutePath();
Also, the .length() gives size in bytes, so you will have to transform it to whatever you want after.
http://docs.oracle.com/javase/tutorial/uiswing/components/filechooser.html http://docs.oracle.com/javase/6/docs/api/java/io/File.html