Re: Open folder

by k005 » Mon Jan 23, 2023 9:14 am

I made an example like this. but how should I make a change for the working folder?


JButton btnKlasorAc = new JButton(" Klasörünü aç");
btnKlasorAc.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {

try {
Runtime.getRuntime().exec("explorer E:\\Videolar");
//com.eteks.sw
frmDuvarAral.dispose(); //Destroy the JFrame object
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}

}
});