infoframe.java~4~
来自「俄罗斯方块游戏,大学时写的,支持单机及点对点网络对战!同时我还在里面加入了使用技」· JAVA~4~ 代码 · 共 33 行
JAVA~4~
33 行
package ct;import javax.swing.*;import java.awt.*;import com.borland.jbcl.layout.*;public class infoFrame extends JFrame { JLabel jLabel1 = new JLabel(); XYLayout xYLayout1 = new XYLayout(); JLabel jLabel2 = new JLabel(); public infoFrame(String name,Color scolor) { try { jbInit(); jLabel2.setText(name); jLabel2.setForeground(scolor); } catch(Exception e) { e.printStackTrace(); } } private void jbInit() throws Exception { jLabel1.setFont(new java.awt.Font("Dialog", 0, 12)); jLabel1.setText("玩家昵称:"); this.getContentPane().setLayout(xYLayout1); jLabel2.setFont(new java.awt.Font("Dialog", 0, 16)); jLabel2.setText(""); this.getContentPane().add(jLabel1, new XYConstraints(20, 10, 70, 30)); this.getContentPane().add(jLabel2, new XYConstraints(66, 39, 150, 30)); }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?