第1页共4页1117申请复业报告十一课泛型1、泛型。泛型就是一种标准,规定集合的类型。arraylista=newarraylist;2、泛型的好处:(1、)简单平安。(2、)所有的强制类型转换都是自动和隐式的,不需要装箱和拆箱。十四课图形界面1、必须继承jframe2、界面设置界面头部标题this.settitle("qq设置");设置界面位置大小this.setbounds(400,200,600,500);设置布局为空this.setlayout(null);添加内容面板containercontainer=this.getcontentpane;不能更改窗口大小this.setresizable(false);关闭程序this.setdefaultcloseoperation(jframe.exit_on_close);显示界面this.setvisible(true);不能更改窗口大小this.setresizable(false);3、组件:jtextfield(文本框)jpassfield(密码框)jlabel(标签)jbutton(按钮)jscrollpane(滚动条面板)第2页共4页jcombobox(下拉框)jcheckbox(复选框)jradiobutton(单项选择按钮,buttongrout(单项选择按钮二选一))jtextarea(文本域,setlinewrap(true)文本域内容是否换行,append(。。。。)文本域中默认文字)插入图片jlabelimages=newjlabel(newimageicon("image/waegf.jpg"));//边框jpanelpane2=newjpanel;pane2.setbounds(2023,160,565,20230);pane2.setborder(borderfactory.createtitledborder("其他选项"));pane2.setlayout(null);container.add(pane2);把边框里的东西放在边框里,不是放在内容面板中4、布局管理器:layout(自定义布局)borderlayout(东南西北中)flowlayout(左到右,上到下)gridlayout(网格布局)cardlayout(卡片布局)十五课事件处理1、事件处理方式:(1)需要事件源(2)需要监听器(3)将事件源与监听器绑定2、事件:(1)普通事件:actionlistener(2)获取焦点事件focuslistener(3)鼠标监听事件mouselistener(4)窗口监听事件windowlistener(5)下拉框选择事件itemlistener(6)键盘事件keylistenergetselectedindex得到选中的索引getseleceeditem得到选中的值第3页共4页3、区分事件源getactioncommand4、适配器(adapter)十七课高级string1、keylistener(键盘事件)getkeychar得到键盘的值getkeycode得到按键的数值2、创立模型model=newdefaulttablemodel(content,title);创立表格jtable=newjtable(model);创立头部jtableheaderheader=jtable.gettableheader;header.setbounds(2023,2023,300,20);把头部放在面...