From 3f33fb95e639af7099f8e10439a38317f3283486 Mon Sep 17 00:00:00 2001 From: Pinapelz Date: Tue, 18 Apr 2023 23:56:12 -0700 Subject: Fixed content pane bug and updated README --- README.md | 4 ++-- pom.xml | 5 +++++ src/main/java/Main.java | 10 +++++++++- src/main/java/TagEditorScreen.java | 2 +- 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c7b2f21..c898c0e 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@ Quick and dirty code to convert YouTube videos to MP3 and automatically adds ID3 tags based on uploader name, title, and thumbnail ### -![image](https://user-images.githubusercontent.com/21994085/227813387-29a15a18-e83a-41d1-a55e-06319c3a3dde.png) +![image](https://user-images.githubusercontent.com/21994085/232991117-a41a33e1-f45a-4043-aa6a-e886a31d2f11.png) ### -![image](https://user-images.githubusercontent.com/21994085/199174510-63b92bec-1611-4e7d-a61a-1cd4c3d4ad41.png) +![image](https://user-images.githubusercontent.com/21994085/232990936-50c96722-e7ed-4945-8971-f90e06a24fc9.png) ### ![image](https://user-images.githubusercontent.com/21994085/199175477-b2d6d5ae-d7db-455c-813f-ad1d3af7fac5.png) diff --git a/pom.xml b/pom.xml index ef973f0..74dec6f 100644 --- a/pom.xml +++ b/pom.xml @@ -24,6 +24,11 @@ + + com.formdev + flatlaf + 3.1.1 + junit junit diff --git a/src/main/java/Main.java b/src/main/java/Main.java index 9b7373c..41b1c63 100644 --- a/src/main/java/Main.java +++ b/src/main/java/Main.java @@ -7,6 +7,11 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Date; +import com.formdev.flatlaf.FlatDarkLaf; +import com.formdev.flatlaf.FlatIntelliJLaf; +import com.formdev.flatlaf.FlatLightLaf; +import com.formdev.flatlaf.themes.FlatMacDarkLaf; +import com.formdev.flatlaf.themes.FlatMacLightLaf; import org.jaudiotagger.audio.AudioFile; import org.jaudiotagger.audio.AudioFileIO; import org.jaudiotagger.tag.FieldKey; @@ -48,6 +53,7 @@ public class Main extends JFrame { } public static void main(String[] args) { + FlatIntelliJLaf.setup(); new Main().setVisible(true); } @@ -230,13 +236,15 @@ public class Main extends JFrame { panel.add(Box.createRigidArea(new Dimension(0, 5))); panel.setBorder(BorderFactory.createEmptyBorder(25, 10, 20, 10)); startButton.setAlignmentX(CENTER_ALIGNMENT); + startButton.setSize(new Dimension(300, 20)); title.setAlignmentX(Component.CENTER_ALIGNMENT); defaultFileBox.setAlignmentX(Component.CENTER_ALIGNMENT); useBlacklistBox.setAlignmentX(Component.CENTER_ALIGNMENT); editButton.setAlignmentX(Component.CENTER_ALIGNMENT); songsGen.setAlignmentX(Component.CENTER_ALIGNMENT); progressBar.setStringPainted(true); - title.setFont(new Font("Verdana", Font.PLAIN, 14)); + progressBar.setFont(new Font("Verdana", Font.PLAIN, 12)); + title.setFont(new Font("Verdana", Font.BOLD, 16)); panel.add(title); panel.add(Box.createVerticalStrut(10)); panel.add(progressBar); diff --git a/src/main/java/TagEditorScreen.java b/src/main/java/TagEditorScreen.java index 3979a28..61afaba 100644 --- a/src/main/java/TagEditorScreen.java +++ b/src/main/java/TagEditorScreen.java @@ -37,7 +37,7 @@ public class TagEditorScreen extends JFrame { private Boolean imageSelected = false; public TagEditorScreen() { - this.setContentPane(mainPanel); + this.add(mainPanel); this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); this.setLocationRelativeTo(null); this.setSize(700, 550); -- cgit v1.2.3