I have a program where I have to open a file and then run a piece of code to do something with it. However since there are different files I want to run different pieces of code depending on the file. I have a JFileChooser setup and it works but I would like to have a something like an if else depending on the file extension.
My apologies is there is a simple answer as I haven't been able to find it.
Thank you.
can you be a little bit more specific about your problem?
Since you are given a File from the JFileChooser, it is easy
to get the file extension, and so call every method that you
like based on this extension.
Greetz,
Piet
There are three kinds of actuaries: those who can count, and those who can't.
Thanks very much for your help. I was able to create a small class to find the extension and then I was able to set up an if else depending on what was returned. BTW how do you remove the very large greenhorn badge!?
Thanks again.