最近在做monopoly的小游戏
棋盘用的是label上显示图片 如果在图片上在绘制一张图片 表示玩家走到这里
棋盘用的是label上显示图片 如果在图片上在绘制一张图片 表示玩家走到这里
解决方案 »
- 外部类产生了多少个实例,内部类就被定义了多少次?
- 执行顺序
- apache+tomcat的错误转向配置
- 如何用java和http协议实现一个文字版的浏览器
- 易道模型与JAVA?
- 从数据库传一个参数(status)过来,是0,1,2,3,4 or 5其中一个...大家帮忙啊!
- 关于IBM Websphere Studio Application Developer 5.0 如何将内部的eclipse更新成2.1版本
- 如何获知一个目录是否为空?
- 菜鸟问题大家帮个忙
- 各位大哥请帮忙!!!!!!!!!!!
- 在Applet输入数据,按下Button后在本页下方自动绘图,求救Applet和Gui高手
- 初学java,问一个关于applet的程序
import java.awt.event.*;
import javax.swing.*;public class BgFrame extends JFrame {
public BgFrame() {
super("Bg Frame Demo");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setSize(300,300); ImageIcon img = new ImageIcon("img.jpg");
JLabel bgLabel = new JLabel(img);
this.getLayeredPane().add(bgLabel, new Integer(Integer.MIN_VALUE));
bgLabel.setBounds(0,0,img.getIconWidth(),img.getIconHeight()); this.getContentPane().add(new JLabel("Hello Background"));
((JPanel)getContentPane()).setOpaque(false); setVisible(true);
} public static void main(String[] args) {
BgFrame f = new BgFrame();
}
}