📄 appconfig.java
字号:
/* * To change this template, choose Tools | Templates * and open the template in the editor. */package mymp3;import java.io.File;import javax.swing.JOptionPane;/** * * @author huliqing */public class AppConfig { private static AppConfig instance = new AppConfig(); private String savePath; private AppConfig() {} public static AppConfig getInstance() { return instance; } public void setSavePath(String path) { this.savePath = path; } public String getSavePath() { if (savePath == null) { try { // 默认在根目录的musics下存放音频文件 File f = new File("musics"); if (!f.exists()) { f.mkdirs(); } savePath = f.getAbsolutePath(); } catch (Exception exception) { JOptionPane.showMessageDialog(null, "出错"); } } return savePath; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -