|
That's just the bit of code that executes when the specific button is clicked.
The Browse class is a JInternalFrame with a JFileChooser called browser in it. That's it.
So I created a new object of the Browse class:
Browse br = new Browse()
Then I used the showOpenDialog method to show the JFileChooser called browser.
Then I used the getSelectedFile method to return the selection made in browser.
It all works perfectly, but it returns only the filename.
i.e. Instead of returning D:\lists\songs.txt it just returns songs.txt
|