How to make a button that, when clicked, opens the %appdata% directory?
问题 I have made a button, but I don't now how to make it open a specific directory like %appdata% when the button is clicked on. Here is the code -> //---- button4 ---- button4.setText("Texture Packs"); button4.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { JFileChooser fileChooser=new JFileChooser("%appdata%"); int status = fileChooser.showOpenDialog(this); fileChooser.setMultiSelectionEnabled(false); if(status == JFileChooser.APPROVE_OPTION) { File file =