FileChooser and Jtable
I want to put the file selected via the filechooser browse dialog and put it in the table.can someone help me plz?
if(e.getActionCommand().equals("browseMusic"))
{
JFileChooser chooser = new JFileChooser();
ExampleFileFilter filter = new ExampleFileFilter();
filter.addExtension("mp3");
filter.setDescription("Media Files");
chooser.setFileFilter(filter);
int returnVal = chooser.showOpenDialog(this);
if(returnVal == JFileChooser.APPROVE_OPTION) {
System.out.println("You chose to open this file: " +
chooser.getSelectedFile().getName());
}
I dont know how to add the getselectedfile into one row of the table.
thanks in advance

