未知题型
Giventhefollowingcode,whichcodefragments,wheninsertedattheindicatedlocation,willsucceedinmakingtheprogramdisplayabuttonspanningthewholewindowarea?()importjava.awt.*;publicclassQ1e65{publicstaticvoidmain(Stringargs[]){Windowwin=newFrame();Buttonbut=newButton("button");//insertcodefragmentherewin.setSize(200,200);win.setVisible(true);}}
A.win.setLayout(newBorderLayout());win.add(but);
B.win.setLayout(newGridLayout(1,1));win.add(but);
C.win.setLayout(newBorderLayout());win.add(but,BorderLayout.CENTER);
D.win.add(but);
E.win.setLayout(newFlowLayout());win.add(but);
- A.awt.*;publicclassQ1e65{publicstaticvoidmain(Stringargs[]){Windowwin=newFrame();Buttonbut=newButton("button");//insertcodefragmentherewin.setSize(200,200);win.setVisible(true);}}
A.win.setLayout(newBorderLayout());win.add(but);
B.win.setLayout(newGridLayout(1,1));win.add(but);
C.win.setLayout(newBorderLayout());win.add(but,BorderLayout.CENTER);
D.win.add(but);
E.win.setLayout(newFlowLayout());win.add(but);
【参考答案】
A, B, C, D
点击查看答案
相关考题
-
未知题型
WritealineofcodethatdeclaresavariablenamedlayoutoftypeLayoutManagerandinitializesitwithanewobject,whichwhenusedwithacontainercanlayoutcomponentsinarectangulargridofequal-sizedrectangles,3componentswideand2componentshigh.()
A.()
-
未知题型
Whichstatementsaretrueconcerningtheeffectofthe>>and>>>operators?()
A.Fornon-negativevaluesoftheleftoperand,the>>and>>>operatorswillhavethesameeffect.
B.Theresultof(-1>>1)is0.
C.Theresultof(-1>>>1)is-1.
D.Thevaluereturnedby>>>willneverbenegativeaslongasthevalueoftherightoperandisequaltoorgreaterthan1.
E.Whenusingthe>>operator,theleftmostbitofthebitrepresentationoftheresultingvalue -
未知题型
VNFM(VNF manager)负责生命周期管理,基本能力包括网元VM的()
A.增
B.删
C.查
D.改
