java.lang.reflect.InvocationTargetException-带数组的小程序

java.lang.reflect.InvocationTargetException-带数组的小程序,java,swing,japplet,invocationtargetexception,Java,Swing,Japplet,Invocationtargetexception,我正在绞尽脑汁试图弄明白为什么我编写的第三个小程序在BlueJ中表现得很好,但当我试图在浏览器中查看它时,会抛出一个“java.lang.reflect.InvocationTargetException”。我还是一个新手,也不知道在哪里可以看到完整的错误日志。请帮忙 密码 为了结束循环,我们打算在类中使用unsigned.jar。我必须将数组移到该方法中,然后它才能工作。因此,我没有使用我奇特的实例化,但我对参数可用性有了更多的了解。感谢所有回复者。HTML是什么样子的?请也复制所有错误信息-

我正在绞尽脑汁试图弄明白为什么我编写的第三个小程序在BlueJ中表现得很好,但当我试图在浏览器中查看它时,会抛出一个“java.lang.reflect.InvocationTargetException”。我还是一个新手,也不知道在哪里可以看到完整的错误日志。请帮忙

密码
为了结束循环,我们打算在类中使用unsigned.jar。我必须将数组移到该方法中,然后它才能工作。因此,我没有使用我奇特的实例化,但我对参数可用性有了更多的了解。感谢所有回复者。

HTML是什么样子的?请也复制所有错误信息-line和stacktrace等详细信息应该在某个地方(自从我使用java以来已经有一段时间了)以及您使用的浏览器?您可能希望查看并编辑以添加错误@丹尼尔布罗斯
/**
 * Array - Dictionary (English to Korean)
 * 
 * Jodi Rehlander
 * October, 2015 for CSci1130-51
 */

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.util.*;
import java.text.*;
import java.applet.*;

public class Dictionary extends JApplet implements ActionListener
{
JLabel mainLabel, picLabel, header;
Image headerImg;
ImageIcon headerIcon, translateIcon;

JButton[ ] words =
    {
        new JButton( "Airplane" ),
        new JButton( "Car" ),
        new JButton( "Cat" ),
        new JButton( "Chair" ),
        new JButton( "Flag" ),
        new JButton( "Newspaper" ),
        new JButton( "Spoon" ),
        new JButton( "Paintbrush" ),
        new JButton( "Horse" ),
        new JButton( "Female" )

    };

ImageIcon[ ] pics =
    {
        new ImageIcon( "airplane.png" ),
        new ImageIcon( "car.png" ),
        new ImageIcon( "cat.png" ),
        new ImageIcon( "chair.png" ),
        new ImageIcon( "flag.png" ),
        new ImageIcon( "newspaper.png" ),
        new ImageIcon( "spoon.png" ),
        new ImageIcon( "paintbrush.png" ),
        new ImageIcon( "horse.png" ),
        new ImageIcon( "female.png" ),
    };



public void init( )
{
    //set default background to white
    getContentPane( ).setBackground( Color.WHITE );

    setLayout( new BorderLayout( ) );

    headerImg = getImage( getCodeBase( ), "headerImg.png" );
    headerIcon = new ImageIcon( headerImg );
    header = new JLabel ( headerIcon );
    add( header, BorderLayout.NORTH );




    translateIcon = new ImageIcon( );
    picLabel = new JLabel( );
    picLabel.setHorizontalAlignment( JLabel.CENTER );
    add( picLabel, BorderLayout.CENTER );


    JPanel pane = new JPanel( new GridLayout( 10, 0 ) );
    pane.setOpaque( true );
    for (int x=0; x < words.length; x++ )
    {
        words[x].addActionListener( this );
        pane.add( words[x] );
    }
    add( pane, BorderLayout.WEST );
}


public void actionPerformed( ActionEvent ae)
{
    Object obj = ae.getSource( );
    for( int x=0; x < words.length; x++ )
        if( obj == words[x] )
           picLabel.setIcon( pics[x] );




    repaint( );    
}
}
    ui: Pushing modality for applet ID 1 with dialog sun.plugin.util.PluginSysUtil$DummyDialog[dialog0,-100,-100,132x38,layout=java.awt.BorderLayout,APPLICATION_MODAL,title=,defaultCloseOperation=HIDE_ON_CLOSE,rootPane=javax.swing.JRootPane[,3,25,126x10,layout=javax.swing.JRootPane$RootLayout,alignmentX=0.0,alignmentY=0.0,border=,flags=16777673,maximumSize=,minimumSize=,preferredSize=],rootPaneCheckingEnabled=true]
basic: Dialog type is not candidate for embedding
ui: Pushing modality for applet ID 1 with dialog javax.swing.JDialog[dialog1,462,324,516x190,layout=java.awt.BorderLayout,TOOLKIT_MODAL,title=Application Error,defaultCloseOperation=HIDE_ON_CLOSE,rootPane=javax.swing.JRootPane[,3,25,510x162,layout=javax.swing.JRootPane$RootLayout,alignmentX=0.0,alignmentY=0.0,border=,flags=16777673,maximumSize=,minimumSize=,preferredSize=],rootPaneCheckingEnabled=true]
ui: Pushing modality for applet ID 1 with dialog sun.plugin.util.PluginSysUtil$DummyDialog[dialog2,-100,-100,132x38,layout=java.awt.BorderLayout,APPLICATION_MODAL,title=,defaultCloseOperation=HIDE_ON_CLOSE,rootPane=javax.swing.JRootPane[,3,25,126x10,layout=javax.swing.JRootPane$RootLayout,alignmentX=0.0,alignmentY=0.0,border=,flags=16777673,maximumSize=,minimumSize=,preferredSize=],rootPaneCheckingEnabled=true]