I am busy creating a GUI in Java with buttons such that if I press a button it must open another program like Excel or Word and also a folder. Is there anyway that this is possible?
You would do something like this...
if (Desktop.isDesktopSupported()) {
Desktop.getDesktop().open(new File("c:\\a.doc"));
}
If they have word then this file will open in word.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With