JLabel lb=new JLabel();
lb.setBackground(Color.red);
lb.setOpaque(true);//必须设置不透明,否侧将不显示颜色
图标标签
con.add(chessboard=new JLabel(new ImageIcon("image\\Main.GIF")));
chessboard.setBounds(0,30,558,620);
当两个jlabel重叠时
先添加的会显示在最上边
JLabel lb=new JLabel();
lb.setBackground(Color.red);
lb.setOpaque(true);//必须设置不透明,否侧将不显示颜色
图标标签
con.add(chessboard=new JLabel(new ImageIcon("image\\Main.GIF")));
chessboard.setBounds(0,30,558,620);
当两个jlabel重叠时
先添加的会显示在最上边