在学习编程的过程中,我觉得不止要获得课本的知识,更多的是通过学习技术知识提高解决问题的能力,这样我们才能走在最前方,更多Java专业知识,广州疯狂java培训为你讲解;
public class SwingTest extends JFrame{
JTable table ;
public SwingTest(String name){
super(name);
/**********************************************
* 给JFrame中添加菜单条 开始(维信科技it教育)
*******************************************/
JMenuBar jmentBar = new JMenuBar();
JMenu menu = new JMenu("文件");
JMenuItem it = new JMenuItem("保存");
jmentBar.add(menu);
menu.add(it);
setJMenuBar(jmentBar);
/**********************************************
* 给JFrame中添加菜单条 结束 http://www.bjweixin.com/
*******************************************/
//表格中的列名
String[] col ={"id", "用户名","密码","年龄","性别","体重"};
//创建table