commit 416b7025e52aecb534c5bed4457251969e98851b Author: Mika Seeartea Date: Fri Feb 24 15:01:51 2023 +0100 arson diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f68d109 --- /dev/null +++ b/.gitignore @@ -0,0 +1,29 @@ +### IntelliJ IDEA ### +out/ +!**/src/main/**/out/ +!**/src/test/**/out/ + +### Eclipse ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache +bin/ +!**/src/main/**/bin/ +!**/src/test/**/bin/ + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ + +### VS Code ### +.vscode/ + +### Mac OS ### +.DS_Store \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..03f397c --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..443467b --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000..8b14221 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1677245874025 + + + + + + + + + + + + file://$PROJECT_DIR$/src/Main.java + 43 + + + + + \ No newline at end of file diff --git a/src/Main.java b/src/Main.java new file mode 100644 index 0000000..3257e83 --- /dev/null +++ b/src/Main.java @@ -0,0 +1,64 @@ +import java.awt.BorderLayout; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.io.File; +import javax.sound.sampled.AudioSystem; +import javax.sound.sampled.Clip; +import javax.sound.sampled.AudioInputStream; +import javax.swing.ImageIcon; +import javax.swing.JButton; +import javax.swing.JFrame; +import javax.swing.JLabel; +import javax.swing.JPanel; + +public class Main extends JFrame { + private JButton playButton; + private JLabel imageLabel; + + public Main() { + super("I am a gay cat"); + + // Set up the play button + playButton = new JButton("Turn gay"); + playButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + playBruhSound(); + } + }); + + // Set up the image label + ImageIcon icon = new ImageIcon("src/uwu.jpg"); + imageLabel = new JLabel(icon); + imageLabel.setHorizontalAlignment(JLabel.CENTER); + + // Add the button and image to the panel + JPanel panel = new JPanel(new BorderLayout()); + panel.add(playButton, BorderLayout.NORTH); + panel.add(imageLabel, BorderLayout.CENTER); + + // Add the panel to the frame + getContentPane().add(panel); + + // Set up the frame + setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + setSize(400, 400); + setVisible(true); + } + + private void playBruhSound() { + try { + File file = new File("src/bruh.wav"); + AudioInputStream audioInputStream = AudioSystem.getAudioInputStream(file); + Clip clip = AudioSystem.getClip(); + clip.open(audioInputStream); + + clip.start(); + } catch (Exception ex) { + ex.printStackTrace(); + } + } + + public static void main(String[] args) { + new Main(); + } +} diff --git a/src/bruh.wav b/src/bruh.wav new file mode 100644 index 0000000..c8cca36 Binary files /dev/null and b/src/bruh.wav differ diff --git a/src/uwu.jpg b/src/uwu.jpg new file mode 100644 index 0000000..8938eff Binary files /dev/null and b/src/uwu.jpg differ diff --git a/ui-bruh.iml b/ui-bruh.iml new file mode 100644 index 0000000..c90834f --- /dev/null +++ b/ui-bruh.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file