Can you use java swing to make such a dazzling mp3 player ?, Javaswing

Source: Internet
Author: User

Can you use java swing to make such a dazzling mp3 player ?, Javaswing

This mp3 player is written based on the swing function of java. I think the UI can still be used to comment on it.

First, let's talk about the original intention of creation. because the work was not very busy some time ago, it's better to find something to do with yourself.

Previously writtenJava Development _ alert clockAndPygame series _ casual Baidu _ perfect UI designDrive to produce the inspiration for writing this mp3.

Maybe everyone may think that it's okay if my head is kicked by a zombie. Why do I have to go to work (work is also coding )?

Do some other things, such as sports, tourism, and reading books? (reading books is always persistent. If so, I would also recommend some books to you:My books)

... But I have a hard time, and I cannot ask for leave before the National Day... so I wrote this mp3 file at work.

 

The mp3 player has gone through 11 versions since its original draft. Currently, all functions are basically complete (except for volume control and playback progress bar ).

 

I will release the compiled resources for you to download (now add comments to the Code)

 

The mp3 player is shown below:

Source: http://www.bkjia.com/uploads/allimg/140821/1A0204321-0.png

NOTE:

The left side of the player is the playlist, and the main interface is on the right side (audio and music pictures in the middle)

Source: http://www.bkjia.com/uploads/allimg/140821/1A0205P3-1.png

NOTE:

Displays the About interface.

Source: http://www.bkjia.com/uploads/allimg/140821/1A0202050-2.png

NOTE:

When you double-click a blog entry, a URL access request will be made. Of course, if you click "yes", you will access my blog.

Source: http://www.bkjia.com/uploads/allimg/140821/1A0203462-3.png

NOTE:

Modify the skin function. There are more than 20 skin series, and you will always enjoy one.

Source: http://www.bkjia.com/uploads/allimg/140821/1A0201912-4.png

NOTE:

I personally like this skin, but I don't know what you mean ....

Source: http://www.bkjia.com/uploads/allimg/140821/1A02015D-5.png

NOTE:

You can also click the skin description to go to the skin description page to view details.

Source: http://www.bkjia.com/uploads/allimg/140821/1A0205413-6.png

NOTE:

Select an item in the playlist and right-click the item to modify the image information of the song.

Source: http://www.bkjia.com/uploads/allimg/140821/1A0204V0-7.png

 

========================================================== ======================

More reading, and english is important.

I'm Hongten

========================================================== ======================


Problems with making an MP3 player using Java

Import java. applet. Applet;
Import java. applet. AudioClip;
Import java. awt. AWTException;
Import java. awt. Frame;
Import java. awt. SystemTray;
Import java. awt. TrayIcon;
Import java. awt. event. ActionEvent;
Import java. awt. event. ActionListener;
Import java. awt. event. MouseAdapter;
Import java. awt. event. MouseEvent;
Import java. awt. event. WindowAdapter;
Import java. awt. event. javaswevent;
Import java. io. File;
Import java. io. IOException;

Import javax. imageio. ImageIO;
Import javax. swing .*;
Public class bofan_2 extends JFrame implements ActionListener
{
Boolean looping = false;
File file1 = null;
AudioClip sound1;
AudioClip chosenClip;
Private JComboBox box1 = null; // song list
Private JButton butbofan = null; // playback
Private JButton butboxhuan = null; // loop playback
Private JButton buttinzi = null; // stop
Private JButton butshan = null; // previous
Private JButton butzhantin = null; // pause
Private JButton butxia = null; // The next line
Private TrayIcon trayIcon; // tray icon
Private SystemTray systemTray; // System Tray
Public bofan_2 ()
{
This. setSize (420,400 );
This. setResizable (false );
This. setLocationRelativeTo (null );
This. setLayout (null );
Box1 = new JComboBox ();
Box1.addItem ("Sad Pacific ");
Box1.addItem ("great scholar ");
Box1.addItem ("old husband and wife ");
Box1.addItem (" ");
Box1.addItem ("Draw ");
Box1.addItem ("Sad City ");
Box1.addItem ("2012 ");
Box1.addItem ("Excellent loyal to the country ");
Box1.addItem ("Qiu Sha & quot ...... remaining full text>

How can I create an mp3 player using java?

There are many reference books, such as java, from entry to entry, and so on. You can find a lot of reference books in the school library. Sun Xin's java is recommended for visual screens. However, this video is very systematic. It seems that there is no special java multimedia playback function. However, if you are new to java, it is recommended that you take a look at it.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.