📄 complete14_4.java
字号:
package questions.c14;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class Complete14_4 extends JApplet {
public void init() {
JLabel label = new JLabel( "Select an audio clip:" );
final JList list = new JList();
JPanel buttonPanel = new JPanel();
final JButton playSound = new JButton( "Play" );
buttonPanel.add( playSound );
// put your ActionEvent handler here to play
// the selected sound
// read in the names of the sound clips from
// the HTML file here
Container cp = getContentPane();
cp.setLayout( new BorderLayout( 10, 10 ) );
cp.add( label, BorderLayout.NORTH );
cp.add( list, BorderLayout.CENTER );
cp.add( buttonPanel, BorderLayout.SOUTH );
setSize( 200, 300 );
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -