diff --git a/build.xml b/build.xml new file mode 100644 index 0000000..e10bdcc --- /dev/null +++ b/build.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + Builds, tests, and runs the project Task_5. + + + diff --git a/build/classes/task_5/Application$ThreadPlayer.class b/build/classes/task_5/Application$ThreadPlayer.class new file mode 100644 index 0000000..a76b4f3 Binary files /dev/null and b/build/classes/task_5/Application$ThreadPlayer.class differ diff --git a/build/classes/task_5/Application.class b/build/classes/task_5/Application.class new file mode 100644 index 0000000..11202a8 Binary files /dev/null and b/build/classes/task_5/Application.class differ diff --git a/build/classes/task_5/Controller.class b/build/classes/task_5/Controller.class new file mode 100644 index 0000000..6dcd9ab Binary files /dev/null and b/build/classes/task_5/Controller.class differ diff --git a/build/classes/task_5/Driver.class b/build/classes/task_5/Driver.class new file mode 100644 index 0000000..c06711b Binary files /dev/null and b/build/classes/task_5/Driver.class differ diff --git a/build/classes/task_5/PlayerGui$1.class b/build/classes/task_5/PlayerGui$1.class new file mode 100644 index 0000000..7fdcdb8 Binary files /dev/null and b/build/classes/task_5/PlayerGui$1.class differ diff --git a/build/classes/task_5/PlayerGui$2.class b/build/classes/task_5/PlayerGui$2.class new file mode 100644 index 0000000..728ce5f Binary files /dev/null and b/build/classes/task_5/PlayerGui$2.class differ diff --git a/build/classes/task_5/PlayerGui$3.class b/build/classes/task_5/PlayerGui$3.class new file mode 100644 index 0000000..329b6fa Binary files /dev/null and b/build/classes/task_5/PlayerGui$3.class differ diff --git a/build/classes/task_5/PlayerGui.class b/build/classes/task_5/PlayerGui.class new file mode 100644 index 0000000..96b42dc Binary files /dev/null and b/build/classes/task_5/PlayerGui.class differ diff --git a/build/classes/task_5/PlayerGui.form b/build/classes/task_5/PlayerGui.form new file mode 100644 index 0000000..68031ea --- /dev/null +++ b/build/classes/task_5/PlayerGui.form @@ -0,0 +1,164 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build/classes/task_5/Task_5.class b/build/classes/task_5/Task_5.class new file mode 100644 index 0000000..564df2d Binary files /dev/null and b/build/classes/task_5/Task_5.class differ diff --git a/manifest.mf b/manifest.mf new file mode 100644 index 0000000..1574df4 --- /dev/null +++ b/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/nbproject/build-impl.xml b/nbproject/build-impl.xml new file mode 100644 index 0000000..4ee765c --- /dev/null +++ b/nbproject/build-impl.xml @@ -0,0 +1,1420 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/nbproject/genfiles.properties b/nbproject/genfiles.properties new file mode 100644 index 0000000..482dbd3 --- /dev/null +++ b/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=652a6206 +build.xml.script.CRC32=2cc291bd +build.xml.stylesheet.CRC32=8064a381@1.80.1.48 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=652a6206 +nbproject/build-impl.xml.script.CRC32=c46ee1f5 +nbproject/build-impl.xml.stylesheet.CRC32=830a3534@1.80.1.48 diff --git a/nbproject/private/private.properties b/nbproject/private/private.properties new file mode 100644 index 0000000..0e7e243 --- /dev/null +++ b/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=C:\\Users\\IRFAN\\AppData\\Roaming\\NetBeans\\8.2\\build.properties diff --git a/nbproject/private/private.xml b/nbproject/private/private.xml new file mode 100644 index 0000000..29463a8 --- /dev/null +++ b/nbproject/private/private.xml @@ -0,0 +1,9 @@ + + + + + + file:/E:/Kuliah/Semester%204/Tugas/PBO/Tugas%205/M.Anugrah_1301154348_IF3912/M.Anugrah_1301154348_IF3912/Task_5/src/task_5/Application.java + + + diff --git a/nbproject/project.properties b/nbproject/project.properties new file mode 100644 index 0000000..a531b0a --- /dev/null +++ b/nbproject/project.properties @@ -0,0 +1,76 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# Files in build.classes.dir which should be excluded from distribution jar +dist.archive.excludes= +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/Task_5.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +file.reference.jl1.0.1.jar=C:\\Users\\IRFAN\\Downloads\\Compressed\\jlayer1.0.1\\JLayer1.0.1\\jl1.0.1.jar +includes=** +jar.compress=false +javac.classpath=\ + ${file.reference.jl1.0.1.jar} +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.external.vm=true +javac.processorpath=\ + ${javac.classpath} +javac.source=1.8 +javac.target=1.8 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=task_5.Task_5 +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/nbproject/project.xml b/nbproject/project.xml new file mode 100644 index 0000000..8494f7b --- /dev/null +++ b/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + Task_5 + + + + + + + + + diff --git a/src/task_5/Application.java b/src/task_5/Application.java new file mode 100644 index 0000000..000e9df --- /dev/null +++ b/src/task_5/Application.java @@ -0,0 +1,91 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package task_5; + +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.util.ArrayList; +import javazoom.jl.decoder.JavaLayerException; +import javazoom.jl.player.Player; + +/** + * + * @author ASUS ROG552VW + */ +public class Application { + private ArrayList musicList; + private ThreadPlayer thread; + private int nowPlaying; + + public Application(){ + musicList = new ArrayList(); + } + + public void addMusic(String path){ + musicList.add(path); + } + + public String[] getMusicList(){ + return (String[]) musicList.toArray(new String[0]); + } + + public String getNowPlayed(){ + return musicList.get(nowPlaying); + } + + public void removeMusic(int i){ + musicList.remove(i); + } + + public void play(int i){ + nowPlaying = i; + String filepath = musicList.get(i); + thread = new ThreadPlayer(filepath); + thread.start(); + } + + public void stop(){ + if (thread != null){ + thread.stop(); + } + } + + public void next(){ + if (nowPlaying < musicList.size() - 1){ + stop(); + play(nowPlaying + 1); + } + } + + public void prev(){ + if(nowPlaying != 0){ + stop(); + play(nowPlaying - 1); + } + } + + public class ThreadPlayer extends Thread{ + private String filepath; + private Player player; + + public ThreadPlayer(String filepath) { + this.filepath = filepath; + } + + @Override + public void run() { + try { + FileInputStream fis = new FileInputStream(filepath); + player = new Player(fis); + player.play(); + } catch (FileNotFoundException exc) { + throw new IllegalStateException("File " + filepath + "not found"); + } catch (JavaLayerException ex) { + throw new IllegalStateException("ERROR while playing file"); + } + } + } +} diff --git a/src/task_5/Controller.java b/src/task_5/Controller.java new file mode 100644 index 0000000..cabe76a --- /dev/null +++ b/src/task_5/Controller.java @@ -0,0 +1,74 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package task_5; + +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import javax.swing.JOptionPane; +import javax.swing.JFileChooser; +import javax.swing.filechooser.FileNameExtensionFilter; + +/** + * + * @author ASUS ROG552VW + */ +public class Controller implements ActionListener{ + private Application app; + private PlayerGui view; + + public Controller(){ + app = new Application(); + view = new PlayerGui(); + view.setVisible(true); + view.addListener(this); + view.SetListMusic(app.getMusicList()); + } + + @Override + public void actionPerformed(ActionEvent ae) { + Object source = ae.getSource(); + try { + if(source.equals(view.getBtnAdd())){ + JFileChooser fc = new JFileChooser(); + FileNameExtensionFilter filter = new FileNameExtensionFilter("MP3 FILES","mp3","mp3"); + fc.setFileFilter(filter); + int returnVal = fc.showOpenDialog(view); + + if(returnVal == JFileChooser.APPROVE_OPTION){ + String path = fc.getSelectedFile().getAbsolutePath(); + app.addMusic(path); + view.SetListMusic(app.getMusicList()); + } + } + else if(source.equals(view.getBtnDelete())){ + int selected = view.getSelectedMusic(); + app.removeMusic(selected); + view.SetListMusic(app.getMusicList()); + } + else if(source.equals(view.getBtnPlay())){ + int selected = view.getSelectedMusic(); + app.stop(); + app.play(selected); + view.setTxFieldPlaying(app.getNowPlayed()); + } + else if(source.equals(view.getBtnStop())){ + app.stop(); + view.setTxFieldPlaying(""); + } + else if(source.equals(view.getBtnNext())){ + app.next(); + view.setTxFieldPlaying(app.getNowPlayed()); + } + else if(source.equals(view.getBtnPrev())){ + app.prev(); + view.setTxFieldPlaying(app.getNowPlayed()); + } + } catch (Exception e) { + JOptionPane.showMessageDialog(view, e.getMessage()); + } + } + +} diff --git a/src/task_5/Driver.java b/src/task_5/Driver.java new file mode 100644 index 0000000..325ddaa --- /dev/null +++ b/src/task_5/Driver.java @@ -0,0 +1,16 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package task_5; + +/** + * + * @author ASUS ROG552VW + */ +public class Driver { + public static void main(String[] args) { + Controller co = new Controller(); + } +} diff --git a/src/task_5/PlayerGui.form b/src/task_5/PlayerGui.form new file mode 100644 index 0000000..68031ea --- /dev/null +++ b/src/task_5/PlayerGui.form @@ -0,0 +1,164 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/task_5/PlayerGui.java b/src/task_5/PlayerGui.java new file mode 100644 index 0000000..f294bcb --- /dev/null +++ b/src/task_5/PlayerGui.java @@ -0,0 +1,203 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package task_5; + +import java.awt.event.ActionListener; + +/** + * + * @author ASUS ROG552VW + */ +public class PlayerGui extends javax.swing.JFrame { + + /** + * Creates new form PlayerGui + */ + public PlayerGui() { + initComponents(); + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // //GEN-BEGIN:initComponents + private void initComponents() { + + jScrollPane1 = new javax.swing.JScrollPane(); + listMusic = new javax.swing.JList<>(); + txFieldPlaying = new javax.swing.JTextField(); + jLabel1 = new javax.swing.JLabel(); + btnAdd = new javax.swing.JButton(); + btnDelete = new javax.swing.JButton(); + btnPrev = new javax.swing.JButton(); + btnPlay = new javax.swing.JButton(); + btnStop = new javax.swing.JButton(); + btnNext = new javax.swing.JButton(); + + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + + listMusic.setModel(new javax.swing.AbstractListModel() { + String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" }; + public int getSize() { return strings.length; } + public String getElementAt(int i) { return strings[i]; } + }); + jScrollPane1.setViewportView(listMusic); + + txFieldPlaying.setEditable(false); + txFieldPlaying.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + txFieldPlayingActionPerformed(evt); + } + }); + + jLabel1.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N + jLabel1.setText("Now Playing"); + + btnAdd.setText("ADD"); + btnAdd.setToolTipText(""); + + btnDelete.setText("DELETE"); + + btnPrev.setText("<<"); + + btnPlay.setText("PLAY"); + + btnStop.setText("STOP"); + + btnNext.setText(">>"); + btnNext.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + btnNextActionPerformed(evt); + } + }); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addComponent(jScrollPane1)) + .addGroup(layout.createSequentialGroup() + .addGap(18, 18, 18) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel1) + .addComponent(btnAdd)) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addGap(74, 74, 74) + .addComponent(txFieldPlaying)) + .addGroup(layout.createSequentialGroup() + .addGap(49, 49, 49) + .addComponent(btnDelete) + .addGap(55, 55, 55) + .addComponent(btnPrev) + .addGap(64, 64, 64) + .addComponent(btnPlay) + .addGap(64, 64, 64) + .addComponent(btnStop) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 85, Short.MAX_VALUE) + .addComponent(btnNext) + .addGap(23, 23, 23))))) + .addContainerGap()) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 165, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(18, 18, 18) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(txFieldPlaying, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel1)) + .addGap(29, 29, 29) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(btnAdd) + .addComponent(btnDelete) + .addComponent(btnPrev) + .addComponent(btnPlay) + .addComponent(btnStop) + .addComponent(btnNext)) + .addContainerGap(34, Short.MAX_VALUE)) + ); + + pack(); + }// //GEN-END:initComponents + + private void txFieldPlayingActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txFieldPlayingActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_txFieldPlayingActionPerformed + + private void btnNextActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnNextActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_btnNextActionPerformed + + public Object getBtnAdd(){ + return btnAdd; + } + + public Object getBtnDelete(){ + return btnDelete; + } + + public Object getBtnNext(){ + return btnNext; + } + + public Object getBtnPlay(){ + return btnPlay; + } + + public Object getBtnPrev(){ + return btnPrev; + } + + public Object getBtnStop(){ + return btnStop; + } + + public void SetListMusic(String[] musicList){ + listMusic.setListData(musicList); + } + + public void setTxFieldPlaying(String filename){ + txFieldPlaying.setText(filename); + } + + public int getSelectedMusic(){ + if(listMusic.getSelectedIndex() == -1){ + throw new IllegalStateException("Please select any music"); + } + return listMusic.getSelectedIndex(); + } + + public void addListener(ActionListener e){ + btnAdd.addActionListener(e); + btnDelete.addActionListener(e); + btnNext.addActionListener(e); + btnPlay.addActionListener(e); + btnPrev.addActionListener(e); + btnStop.addActionListener(e); + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton btnAdd; + private javax.swing.JButton btnDelete; + private javax.swing.JButton btnNext; + private javax.swing.JButton btnPlay; + private javax.swing.JButton btnPrev; + private javax.swing.JButton btnStop; + private javax.swing.JLabel jLabel1; + private javax.swing.JScrollPane jScrollPane1; + private javax.swing.JList listMusic; + private javax.swing.JTextField txFieldPlaying; + // End of variables declaration//GEN-END:variables +} diff --git a/src/task_5/Task_5.java b/src/task_5/Task_5.java new file mode 100644 index 0000000..b7e90b9 --- /dev/null +++ b/src/task_5/Task_5.java @@ -0,0 +1,21 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package task_5; + +/** + * + * @author ASUS ROG552VW + */ +public class Task_5 { + + /** + * @param args the command line arguments + */ + public static void main(String[] args) { + // TODO code application logic here + } + +}