设置好的按扭都不见了,高手指教.....
原代码:
package Audio;import java.io.*;
import java.awt.*;
import java.applet.*;
import java.awt.event.*;import javax.swing.*;
public class J_Ketoo extends JApplet implements ActionListener,ItemListener
{ File f = new File("D:\\Enterprise-SDK-Callisto-322-win32\\workspace\\J_Audio\\Audio");
File[] templefile_list=f.listFiles();//templefile_list数据中包含目录下所有文件及目录
String name[] = new String[templefile_list.length];

private JButton m_buttonPlay, m_buttonLoop, m_buttonStop;
private List myList=new List(templefile_list.length,true);


public void init()
{
Container container = getContentPane();
container.setLayout(new FlowLayout());

for(int i=0,j=0;i<=templefile_list.length;i++)//把文件名输入列表,删除非音频文件
{
name[j]=templefile_list[i].getName();
if(name[j].substring(name[j].lastIndexOf('.')+1,templefile_list.length)=="mid")
{ myList.addItem(name[j]);
j++;
}
}
myList.addItemListener( this );
container.add( myList);

m_buttonPlay = new JButton("Play");
m_buttonPlay.addActionListener( this );
container.add( m_buttonPlay );

m_buttonLoop = new JButton("Loop");
m_buttonLoop.addActionListener( this );
container.add( m_buttonLoop );

m_buttonStop = new JButton("Stop");
m_buttonStop.addActionListener( this );
container.add( m_buttonStop );
}

public void itemStateChanged(ItemEvent e) {
}
        public void actionPerformed(ActionEvent e) {

}