📄 movie3d.java
字号:
package j3d_movie;
///**启动程序
// * <p>Title: </p>
// * <p>Description: </p>
// * <p>Copyright: Copyright (c) 2008</p>
// * <p>Company: </p>
// * @author not attributable
// * @version 1.0
// */
//
//public class Movie3D {
// public Movie3D() {
// }
//
//}
// Movie3D.java
// Andrew Davison, May 2005, ad@fivedots.coe.psu.ac.th
/* Show a movie on a screen in the checkboard world.
The movie filename is read from the command line, and is assumed
to be in the movies/ subdirectory.
The movie is played using JMF. Best results are achieved if
the movie is in MPEG-1 format, and doesn't have an audio track.
The example in the subdirectory QTMovie3D is a version of this
application that uses Quicktime for Java to manipulate movies.
1.显示一部电影就一个屏幕,在checkboard世界。
电影filename是读出命令行,是假设
要在电影/子目录。
这部电影是发挥利用JMF的。最好的结果是,如果取得
这部电影是在MPEG - 1的格式,并没有一个音轨。
的例子,在子目录qtmovie3d是一个版本,这
申请使用的QuickTime for Java中操纵的电影。
*/
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class Movie3D extends JFrame
{
private WrapMovie3D w3d;
public Movie3D(String fnm)
{
super("Movie3D for " + fnm);
Container c = getContentPane();
c.setLayout( new BorderLayout() );
w3d = new WrapMovie3D( "movies/" + fnm );
c.add(w3d, BorderLayout.CENTER);
// setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
addWindowListener( new WindowAdapter() {
public void windowClosing(WindowEvent e)
{ w3d.stopMovie();
System.exit(0);
}
});
pack();
setResizable(false); // fixed size display
setVisible(true);
} // end of Movie3D()
// -----------------------------------------
public static void main(String[] args)
{
if (args.length != 1){
new Movie3D("qing.mpg");
System.out.println("Usage: java Movie3D <MPG file name>");
}
else{
new Movie3D(args[0]);
System.out.println(args[0]);
}
}
} // end of Movie3D class
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -