yulan.java~2~
来自「一个使用JB9编写的网络俄罗斯方块,大家可以下载如有不足还请原谅,有是可以给我E」· JAVA~2~ 代码 · 共 48 行
JAVA~2~
48 行
package one_piece;import java.awt.*;import com.borland.jbcl.layout.*;import javax.swing.*;/** * <p>Title: ONE PIECE</p> * <p>Description: </p> * <p>Copyright: Copyright (c) 2005</p> * <p>Company: </p> * @author not attributable * @version 1.0 */public class YuLan extends JPanel { int sqlenght = 20; ImageIcon Iamge; public static int Row = 20; public static int Comln = 10; XYLayout xYLayout1 = new XYLayout(); JLabel label[][] = new JLabel[4][4]; public YuLan() { try { jbInit(); } catch(Exception ex) { ex.printStackTrace(); } } pubic seticon(int i,int j, ImageIcon image) { Row = i; Comln = j; Iamge = image; label[Row][Comln].setIcon(Image); } void jbInit() throws Exception { for(int j = 0;j<4;j++) for(int i = 0;i<4;i++) { label[j][i] = new JLabel(); //this.add() this.add(label[j][i], new XYConstraints (sqlenght*j, sqlenght*i, -1, -1)); } this.setLayout(xYLayout1); }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?