首页>代码>java swing开发贪吃蛇小游戏源码>/贪食蛇/src/tanshishe/Homepage.java
package tanshishe;


import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;

public class Homepage extends JPanel {
	/**
	 * 主页画布类
	 */
	private static final long serialVersionUID = -6163797946558070638L;
	ImageIcon img1 = new ImageIcon(Homepage.class.getResource("start.png"));
	ImageIcon img2 = new ImageIcon(Homepage.class.getResource("setting.png"));
	ImageIcon img3 = new ImageIcon(Homepage.class.getResource("help.png"));
	ImageIcon img4 = new ImageIcon(Homepage.class.getResource("max.png"));
	ImageIcon snake = new ImageIcon(getClass().getResource("snake.png"));
	JButton bt1 = new JButton(img1);
	JButton bt2 = new JButton(img2);
	JButton bt3 = new JButton(img3);
	JButton bt4 = new JButton(img4);
	JLabel title=new JLabel(snake);
	public Homepage(){
	
		this.setLayout(null);
		bt1.setBounds(650, 150,174,72);
		bt2.setBounds(650, 230, 174, 72);
		bt3.setBounds(650, 310, 174, 72);
		bt4.setBounds(650, 390, 174, 72);
		title.setBounds(170, 35, 333, 390);
		this.add(bt1);
		this.add(bt2);	
		this.add(bt3);
		this.add(bt4);
		this.add(title);
	}

}
最近下载更多
yerwiu  LV10 2023年8月13日
tdcq123  LV14 2022年9月4日
daoge123  LV3 2022年5月13日
男友臂  LV1 2020年10月30日
675104182  LV14 2020年9月21日
123456小  LV3 2020年6月13日
ewan007  LV29 2020年4月30日
最代码安逸  LV15 2020年3月9日
zyfuchen  LV8 2019年12月28日
wangxiaorui123  LV2 2019年12月21日
最近浏览更多
zhihong fan  LV2 2023年12月26日
bangyiyang  LV2 2023年12月21日
yerwiu  LV10 2023年8月13日
493240689  LV3 2023年5月11日
huangzy  LV12 2023年4月6日
ftlovelzh 2023年3月17日
暂无贡献等级
舒舒不吃葱花  LV2 2022年11月18日
1014422538  LV1 2022年10月6日
tdcq123  LV14 2022年9月4日
李宜昌  LV5 2022年7月7日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友