Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

FileChooser and Jtable

Hi
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
[788 byte] By [Sahel] at [2007-11-11 8:44:25]