在出错处写上SplashScreen s = new SplashScreen();

解决方案 »

  1.   

    Class 'SplashScreen' doesn't have a constructor that matches'SplashScreen()'
    类'SplashScreen'中没有匹配的构造函数'SplashScreen()',看看类'SplashScreen'的定义,查一下它的构造函数的定义。或者它的父类的构造函数。
      

  2.   

    应该是cherami说的,如果程序不长的话贴出来很容易看清楚的
      

  3.   

    谢了。下面就是程序。
    import com.ms.wfc.app.*;
    import com.ms.wfc.core.*;
    import com.ms.wfc.ui.*;
    import com.ms.wfc.html.*;
    import com.ms.wfc.io.*;/**
     * This class can take a variable number of parameters on the command
     * line. Program execution begins with the main() method. The class
     * constructor is not invoked unless an object of type 'SplashScreen'
     * created in the main() method.
     */
    public class SplashScreen extends Form
    {
    //声明私有成员变量
    private String m_sProduct =new String ();
    private String m_sVersion= new String ();
    private String m_sCopyright= new String ();
    private String m_sWarningText= new String ();
    private String m_sUserName= new String ();
    private String m_sCompanyName= new String ();
    private String m_sBackPath= new String ();
    private Bitmap m_bmBackSplash;

    public  SplashScreen(String product,
     String version,
     String copyright,
     String userName,
     String company,
     String warning)
    {
    this();
    setProduct(product);
    setVersion(version);
    setCopyright(copyright);
    setUserName(userName);
    setCompany(company);
    setWarningText(warning);
    }
    private void setSplashDelay(int delay)
    {
    if (delay>0)
    tmrSplash.setInterval(delay);
    }
    public void setProduct(String product)
    {
    m_sProduct=product;
    }
    public void setVersion(String version)
    {
    m_sVersion=version;
    }
    public void setCopyright(String copyright)
    {
    m_sCopyright=copyright;
    }
    public void setUserName(String userName)
    {
    m_sUserName=userName;
    }
    public void setCompany(String company)
    {
    m_sCompanyName=company;
    }
    public void setWarningText(String warning)
    {
    if (warning.length ()>0)
    {
    m_sWarningText=warning;
    }
    if (warning.equals ("NA")==true)
    {
    m_sWarningText="";
    }
    }
    public void setLogoImage(String logoImage)
    throws IOException
    {
    if (logoImage.length ()>0 && File.exists(logoImage)==true)
    {
    try
    {
    picLogo.setImage(new Bitmap (logoImage));
    picLogo.setVisible(true);
    }
    catch (IOException ex)
    {
    MessageBox.show ("载入图片时发生错误!"+"请检查图片的路径和文件名","Splash Example",MessageBox.ICONERROR +MessageBox.OK );
    picLogo.setVisible(false);
    return;
    }
    }
    }
    public void setSplashBackground(String backImage)
    {
    m_sBackPath =backImage;
    }

    public void showSplash(int interval) throws IOException
    {
    setSplashDelay(interval);
    if (m_sBackPath.length ()>0
    &&File.exists(m_sBackPath)==true)
    {
    try 
    {
    m_bmBackSplash=new Bitmap (m_sBackPath);
    }
    catch(IOException ex)
    {
    MessageBox.show ("载入图片时发生错误!"+"请检查图片的路径和文件名","Splash Example",MessageBox.ICONERROR +MessageBox.OK );
    }
    }
    tmrSplash.setEnabled(true);
    this.showDialog ();
    }
    public void closeSplash(Object sender,Event e)
    {
    tmrSplash.setEnabled(false);
    this.dispose ();
    }
    public void paintSplash(Object sender,PaintEvent e)
    {
    Graphics gdi;
    if (m_bmBackSplash==null)
    {
    gdi=this.createGraphics ();
    }
    else
    {
    gdi=m_bmBackSplash.getGraphics ();
    }
    gdi.setOpaque (false);
    gdi.setFont(new Font ("Arial",12.0f,FontSize.CHARACTERHEIGHT ,FontWeight.BOLD ,false,false,false));
    gdi.drawString ("本窗体实例允许下列公司或个人使用:",170,40);
    if (m_sUserName.length ()>0)
    gdi.drawString(m_sUserName,170,60);
    if (m_sCompanyName.length ()>0)
    gdi.drawString (m_sCompanyName,170,90);
    gdi.setFont(new Font("Arial",18.0f));
    if (m_sVersion.length()>0)
    gdi.drawString(m_sVersion,170,210);
    gdi.setFont(new Font("Arial",14.0f,FontSize.CHARACTERHEIGHT ,FontWeight.BOLD ,false,false,false));
    if (m_sCopyright.length()>0)
    gdi.drawString(m_sCopyright,170,240);
    gdi.setFont(new Font("Arial",12.0f,FontSize.CHARACTERHEIGHT ,FontWeight.BOLD ,false,false,false));
    if (m_sWarningText.length()>0)
    gdi.drawString(m_sWarningText,10,280);
    gdi.setFont(new Font("Arial",36.0f,FontSize.CHARACTERHEIGHT ,FontWeight.BOLD ,false,false,false));
    gdi.setTextColor (Color.GRAYTEXT);
    gdi.drawString (m_sProduct,172,172);
    gdi.setTextColor (Color.BLACK );
    gdi.drawString (m_sProduct,170,170);
    if (m_bmBackSplash!=null){
    gdi=this.createGraphics ();
    gdi.drawImage (m_bmBackSplash,0,0);
    }
    } /**
     * SplashScreen overrides dispose so it can clean up the
     * component list.
     */
    public void dispose()
    {
    super.dispose();
    components.dispose();
    }
    /**
     * NOTE: The following code is required by the Visual J++ form
     * designer.  It can be modified using the form editor.  Do not
     * modify it using the code editor.
     */
    Container components = new Container();
    PictureBox picLogo = new PictureBox();
    Timer tmrSplash = new Timer(components); private void initForm()
    {
    this.setText("\"*!\"");
    this.setAutoScaleBaseSize(new Point(6, 12));
    this.setBorderStyle(FormBorderStyle.NONE);
    this.setClientSize(new Point(455, 310));
    this.setControlBox(false);
    this.setMaximizeBox(false);
    this.setMinimizeBox(false);
    this.setShowInTaskbar(false);
    this.setStartPosition(FormStartPosition.CENTER_SCREEN); picLogo.setLocation(new Point(16, 16));
    picLogo.setSize(new Point(145, 145));
    picLogo.setTabIndex(0);
    picLogo.setTabStop(false);
    picLogo.setText("pictureBox1");
    picLogo.setSizeMode(PictureBoxSizeMode.STRETCH_IMAGE); tmrSplash.setInterval(2500);
    /* @designTimeOnly tmrSplash.setLocation(new Point(288, 208)); */ this.setNewControls(new Control[] {
    picLogo});
    } /**
     * The main entry point for the application. 
     *
     * @param args Array of parameters passed to the application
     * via the command line.
     */
    public static void main(String args[])
    {
    Application.run(new SplashScreen());
    }
    }