1条回答 默认 最新
徐大大大亮 2016-11-08 11:43关注import java.awt.EventQueue;
import javax.swing.JFrame;
import javax.swing.JTable;public class Yard {
private JFrame frame; private JTable table; String[] columnNames = { "行号", "代码"}; //用于显示输入测试样例 Object[][] obj = new Object[100][2];// //用于显示输入测试样例 /** * Launch the application. */ public static void main(String[] args) { EventQueue.invokeLater(new Runnable() { public void run() { try { qwe window = new qwe(); window.frame.setVisible(true); } catch (Exception e) { e.printStackTrace(); } } }); } /** * Create the application. */ public qwe() { initialize(); } /** * Initialize the contents of the frame. */ private void initialize() { frame = new JFrame(); frame.setBounds(100, 100, 450, 300); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.getContentPane().setLayout(null); table = new JTable(obj,columnNames); table.setBounds(68, 58, 178, 136); frame.getContentPane().add(table); }解决 无用评论 打赏 举报

