您现在所在的是:

电脑编程

回帖:1个,阅读:2604 [上一页] [1] [下一页]
871
东东
文章数:2
年度积分:50
历史总积分:871
注册时间:2002/4/30
发站内信
发表于:2002/6/20 21:50:00
#0楼
Java编的视频播放器为申莫只能播放黑白文件,而不能播放彩色的?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
871
东东
文章数:2
年度积分:50
历史总积分:871
注册时间:2002/4/30
发站内信
发表于:2002/6/20 21:52:00
#1楼
文件如下: import java.applet
文件如下:
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

关于我们 | 联系我们 | 广告服务 | 本站动态 | 友情链接 | 法律声明 | 非法和不良信息举报

工控网客服热线:0755-86369299
版权所有 工控网 Copyright©2025 Gkong.com, All Rights Reserved

46.8003