登录
首页 电脑编程
回帖 发帖
正文

主题:Java编的视频播放器为申莫只能播放黑白文件,而不

点击:2618 回复:1

Java编的视频播放器为申莫只能播放黑白文件,而不能播放彩色的?
02-06-20 21:50
文件如下:
import java.applet.Applet;
import java.awt.*;
import java.awt.event.*;
import java.lang.String;
import java.net.URL;
import java.net.MalformedURLException;
import java.io.IOException;
import java.util.Properties;
import javax.media.*;
import com.sun.media.*;
public class TVApplet extends Applet implements ControllerListener//
{   Player player = null;
   Component visualComponent = null;
   Component controlComponent = null;
   Component progressBar = null;
   long CachingSize = 0L;    
   Panel panel = null;
   Panel vPanel = null;
   int controlPanelHeight = 0;
   Image [] showmeImage = null;
   Image [] zoomImageUp = null;
   Image [] zoomImageDn = null;
   CPanel cPanel = null;
   ZoomButton zoomButton;
   
   final int [] VLEFT = {220, 140};
   final int [] VTOP  = {40, 20};
   final int [] VRIGHT = {396, 140 + 330};
   final int [] VBOTTOM = {190, 20 + 300};
   final int [] WIDTH = {176, 330};
   final int [] HEIGHT = {150, 300};
   final int HALF = 0;
   final int FULL = 1;
   int tSize = 0;
   
   public void init()
   {   setLayout(null);
setBackground(Color.white);
cPanel = new CPanel( );
add(cPanel);
String szSize = getParameter("SIZE");

if (Toolkit.getDefaultToolkit().getScreenSize().width > 800)
   tSize = 1;
else
   tSize = 0;

if (szSize != null)
       {   if (szSize.toLowerCase().equals("full"))
tSize = 1;
   else if (szSize.toLowerCase().equals("half"))
tSize = 0;
}
cPanel.setBounds(VLEFT[tSize], VTOP[tSize], WIDTH[tSize], HEIGHT[tSize]);
showmeImage = new Image[FULL + 1];
zoomImageUp = new Image[FULL + 1];
zoomImageDn = new Image[FULL + 1];
showmeImage[HALF] = getImage(getDocumentBase(), "cupanim.gif");
showmeImage[FULL] = getImage(getDocumentBase(), "cupanim.gif");
zoomImageUp[HALF] = getImage(getDocumentBase(), "full.bmp");
zoomImageDn[HALF] = getImage(getDocumentBase(), "full.bmp");
zoomImageUp[FULL] = getImage(getDocumentBase(), "harf.bmp");
zoomIm
02-06-20 21:52

工控新闻

更多新闻资讯