Hi guys well what I want to do is play a video clip when my program starts. My menu has been set up to how I want it to look. I've researched how to do this but I cannot seem to find anything that I want. All I find is how to create a video player where the user can select their own videos. This is not what I want to do. All I want is my program too play a video clip on start up.
Any help or links you can give would be appreciated
My code below:
import java.awt.Color;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.ButtonGroup;
import javax.swing.JCheckBoxMenuItem;
import javax.swing.JFrame;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JRadioButtonMenuItem;
public class Basicgui extends JFrame {
public Basicgui() {
setTitle("Video Play Simulation");
setSize(600, 500);
// Creates a menubar for a JFrame
JMenuBar menuBar = new JMenuBar();
// Add the menubar to the frame
setJMenuBar(menuBar);
// Define and add two drop down menu to the menubar
JMenu fileMenu = new JMenu("File");
JMenu editMenu = new JMenu("Edit");
JMenu viewMenu = new JMenu("view");
menuBar.add(fileMenu);
menuBar.add(editMenu);
menuBar.add(viewMenu);
JMenuItem EXITAction = new JMenuItem("EXIT");
JMenuItem updateAction = new JMenuItem("update Videos");
JMenuItem playlistAction = new JMenuItem("Create Playlist");
JMenuItem queryAction = new JMenuItem("view directors");
JMenuItem videosAction = new JMenuItem("Check Videos");
fileMenu.add(EXITAction);
fileMenu.add(videosAction);
editMenu.add(updateAction);
editMenu.add(playlistAction);
viewMenu.add(videosAction);
viewMenu.add(queryAction);
////////////// COLOURS ///////////////////
menuBar.setBackground(Color.BLACK);
fileMenu.setForeground(Color.red);
editMenu.setForeground(Color.red);
viewMenu.setForeground(Color.red);
EXITAction.setForeground(Color.red);
updateAction.setForeground(Color.red);
playlistAction.setForeground(Color.red);
queryAction.setForeground(Color.red);
videosAction.setForeground(Color.red);
//////// BACKGROUNDS //////////
EXITAction.setBackground(Color.BLACK);
updateAction.setBackground(Color.BLACK);
playlistAction.setBackground(Color.BLACK);
queryAction.setBackground(Color.BLACK);
videosAction.setBackground(Color.BLACK);
}
public static void main(String[] args) {
Basicgui me = new Basicgui();
me.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
me.setVisible(true);
me.setBackground(Color.BLACK);
}
}