摘要:
import java.awt.event.KeyEvent;import java.awt.event.KeyListener;import javax.swing.JFrame;/** To change this template, choose Tools | Templates* and open the template in the editor.*/import javax.swing.JPanel;import javax.swing.JTextField;/**** @author李效伦*/public class HOHO extends JFrame implement 阅读全文
posted @ 2012-12-13 12:48
Entropy_lxl
阅读(1700)
评论(0)
推荐(0)
摘要:
JFame.setIconImage(Toolkit.getDefaultToolkit().creatImage(fileName));fileName是String类型,是图片文件的名字及路径 阅读全文
posted @ 2012-12-13 10:56
Entropy_lxl
阅读(331)
评论(0)
推荐(0)
摘要:
JLabel background = new JLabel(new ImageIcon(url));//url代表你图片的路径this.add(background)即可//将你的jlabel背景加到jframe上当然jframe也有专门的设置背景的复方法,忘掉了,你查一下最好下一个JDK -API手册,一查便知 阅读全文
posted @ 2012-12-13 10:55
Entropy_lxl
阅读(8003)
评论(0)
推荐(0)
摘要:
File musicFile=new File("所要添加的音乐名");URI uri=musicFile.toURI();URL url=uri.toURL():AudioClip=Applet.newAudioClip(url);控制音乐的播放与停止clip.play();clip.stop(); 阅读全文
posted @ 2012-12-13 10:54
Entropy_lxl
阅读(2034)
评论(0)
推荐(0)

浙公网安备 33010602011771号