Hello every1.
I'm having a tough time trying to make a button(when clicked) link or point to a partucular file(e.g setup file) and run that file within the same system.
Please help!
a little code will help.
thanks in advance:(
Printable View
Hello every1.
I'm having a tough time trying to make a button(when clicked) link or point to a partucular file(e.g setup file) and run that file within the same system.
Please help!
a little code will help.
thanks in advance:(
You want to run a windows executable?
If you are dealing with websites, use BrowserLauncher.Code:JButton button = new JButton("Fraps!");
button.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
try
{
Runtime rt = Runtime.getRuntime();
rt.exec("C:\\Fraps\\fraps.exe");
}
catch (Exception ioe)
{
ioe.printStackTrace();
}
}
});
Yea! thanks Drain, I got that working alright.
Thanks for the help