为什么在方法中configFile.setProperty("dir", "test")
不起作用。它不会将该属性放入文件中。actionPerformed
ActionListener
settings.Save.addActionListener(new ActionListener(){
@Override
public void actionPerformed(ActionEvent e) {
// Check config file for first startup
configFile = new Properties();
try {
configFile.load(new FileInputStream("config.properties"));
} catch (IOException ex) {
Logger.getLogger(Manuals.class.getName()).log(Level.SEVERE, null, ex);
}
configFile.setProperty("dir", "ja");
// Close windows
settings.dispose();
interFace.setVisible(true);
}
});