Results 1 to 2 of 2
- 01-25-2010, 05:58 PM #1Member
- Join Date
- Aug 2009
- Rep Power
How to Embed Changing Background Music and Graphics using Applets
My group mates and I are going to do a java program which should show/prompt the user/viewer different themes/graphics with different background music.
The scenario should happen this way;
The user/viewer would enter a particular date: (He/she is expected to enter just four dates. Dates which point to four of the holidays/seasons celebrated in our university namely: Christmas(Dec 25),New Year(Jan 01),Our College's Day (Jan 23-27),Valentine's Day(Feb 14)).
After doing so,(entering one date at a time), the program should display a season greeting with graphics/theme/image appropriate to the event plus background music. Now, our problem is, we can't roughly think of the most efficient/correct way to do it.
I look forward to your helpful responses. :)
- 01-26-2010, 12:22 AM #2
Like a stand alone desktop type of application ? If this is the case, I would have a look at the "Swing" API. This is the modern built-in windowing and widgets tools. It is possible to create dialog boxes, main windows that let us set backgrounds to be images.
I would start by making an application load up, create a window of a reasonable size, and set its background to an image that is also in some images folder off of the current working folder or in the classpath, such as stuffed as a resource into the jar file. After getting an image to work as a background, build a dialog with the radio buttons and the ok button to do the operation, launching it at start up.
For the sound, there is the "Java Media Framework" (JMF) directly from Sun and more recently an open source replacement api, Framework for Media in Java (FMJ). The latter is targeting support on platforms the Sun API does not yet support, such as Linux and MacOS, and being open type of project, is likely to evolve beyond the original JMF standard. I would think looking there is a good start for figuring out how to make an application play sounds.
or heck, bonus points for making a Java Swing application that works both as a desktop application and as an applet withing a web browser.
- By MasterD in forum New To JavaReplies: 16Last Post: 04-06-2009, 11:57 PM
- By kuppi in forum Java AppletsReplies: 1Last Post: 10-16-2008, 10:56 PM
- By carderne in forum New To JavaReplies: 4Last Post: 08-05-2008, 02:09 PM
- By Java Tip in forum SWT TipsReplies: 0Last Post: 07-02-2008, 09:07 PM
- By gui.gomes in forum Advanced JavaReplies: 3Last Post: 11-19-2007, 03:08 PM