Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void Button_GOMouseClicked(java.awt.event.MouseEvent evt) {
- String c=TextArea_IO.getText();
- if(c=="a")
- {
- try
- {
- if ((new File("c:\\Users\\Federico\\Desktop\\rinuncia_studi.pdf")).exists())
- {
- Process p = Runtime
- .getRuntime()
- .exec("rundll32 url.dll,FileProtocolHandler c:\\Users\\Federico\\Desktop\\rinuncia_studi.pdf");
- TextArea_IO.setText("PORCODDIO");
- p.waitFor();
- }
- else
- {
- TextArea_IO.setText("File does not exist");
- }
- TextArea_IO.setText("There you go");
- }
- catch (Exception ex)
- {
- ex.printStackTrace();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement