Then you need to say:
java.awt.Desktop.getDesktop().edit(new File(txtInput.getText()));
(there are obviously other things you should do, like checking input, but this is how you create a new...
Type: Posts; User: aussiemcgr
Then you need to say:
java.awt.Desktop.getDesktop().edit(new File(txtInput.getText()));
(there are obviously other things you should do, like checking input, but this is how you create a new...
To reiterate what Norm said, you need to create a File object (look at my previous post for a link to the API document for the File class).
What does txtInput.getText() represent? Is it a file path...
Try:
java.awt.Desktop.getDesktop().edit(file);
I'm told there might be issues with earlier versions of Windows (XP and 2003) while using this. file would be a File (File (Java Platform SE 7 ))...
Wait, I'm confused. Are you trying to open the file in a text box (ie: part of the GUI) or are you trying to get the file to open up in its default editor (ie: opening the document in MS Word or...