showinfo.java

来自「码头船舶管理系统 适合初学者使用 J2SE的知识」· Java 代码 · 共 20 行

JAVA
20
字号
import java.awt.Color;

import javax.swing.JFrame;
import javax.swing.JLabel;
public class ShowInfo {
	
	public ShowInfo(Customer c){
		JFrame frame = new JFrame("显示资料");
		String tt = new String(c.getName()+"  "+c.getTel()+"  "+c.getAddress()+"  "+c.getB().getId());
		JLabel lb = new JLabel(tt);
		frame.add(lb);
		lb.setForeground(Color.red);
		frame.setSize(300,100);
		frame.setVisible(true);
		
		
	}

}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?