⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sw5.java

📁 swing.rar
💻 JAVA
字号:
/*
JTable
	Class

	Used to show the informations as Row,Col format
cons:
	JTable(String datas[][],String title[])

Note:
	If we run this program we can't see the Title

	To see the title we have to attach the JTable to JScrollPane
*/

import java.awt.*;
import javax.swing.*;

class sw5 extends JFrame
{
	JTable t1;

	public sw5()
	{
		Container con = getContentPane();
		String d[][] = { {"1","Rin","20"},{"2","Lux","30"},{"3","Det","50"} };
		String t[] = {"Pno","Pname","Qty"};
		t1 = new JTable(d,t);
		con.add(t1);
		setSize(300,300);
		setVisible(true);
	}

	public static void main(String args[])
	{
		new sw5();
	}
}

⌨️ 快捷键说明

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