aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/FileUtility.java
diff options
context:
space:
mode:
authorDonald Shan <xxpinapelzxx@gmail.com>2022-08-22 13:35:24 -0700
committerDonald Shan <xxpinapelzxx@gmail.com>2022-08-22 13:35:24 -0700
commitf1402e94fc814a402b5c156e7197b2e11d9f325c (patch)
treec2b5b7724391e9b431317c1f80a64ba7c8a2fe21 /src/main/java/FileUtility.java
parentdb293e9d57be0823c27f045a59f2eae357e7d4f6 (diff)
Manual Tagging Improvedv0.5
- Added the ability to manually change album art - Moved UI initialization code to bottom of file
Diffstat (limited to 'src/main/java/FileUtility.java')
-rw-r--r--src/main/java/FileUtility.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/main/java/FileUtility.java b/src/main/java/FileUtility.java
index cc0dffb..73178ae 100644
--- a/src/main/java/FileUtility.java
+++ b/src/main/java/FileUtility.java
@@ -118,6 +118,20 @@ public class FileUtility {
}
}
}
+
+ public static String showImageFileChooser() {
+ javax.swing.JFileChooser chooser = new javax.swing.JFileChooser();
+ FileNameExtensionFilter filter = new FileNameExtensionFilter("JPEG Image File", "jpg", "jpeg");
+ chooser.setFileFilter(filter);
+ chooser.setDialogTitle("Select a image file");
+ chooser.setFileSelectionMode(javax.swing.JFileChooser.FILES_ONLY);
+ chooser.setAcceptAllFileFilterUsed(false);
+ if (chooser.showOpenDialog(null) == javax.swing.JFileChooser.APPROVE_OPTION) {
+ return chooser.getSelectedFile().getAbsolutePath();
+ } else {
+ return null;
+ }
+ }
public static ArrayList<String> txtToArrayList(String fileName) {
ArrayList<String> lines = new ArrayList<String>();
try {
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage