题目内容

本题的功能是用流式布局管理器来管理窗口中的按钮。在执行程序时指定生成按钮的个数,并把这些按钮都放置在流式布局管理器的窗口中。 import java. awt. * ; import java. awt. event. * ; import javax. swing. * ; public class java2 public static void main(String[] args) if(args. length!=1) System. out. println("请指定按钮的个数") System. exit(0); String buttonString=args[0]; int buttonNumber=______; ButtonFrame frame=new ButtonFrame(buttonNumber); frame. setDefaultCloseOperation(JFrame. EXIT_ON_CLOSE); frame. show(); class ButtonFrame extends JFrame public ButtonFrame(______) buttons=buttonNumber; setTitle("java2"); setSize(WIDTH, HEIGHT); JPanel buttonPanel=new JPanel(); for(int i=0; i<buttons; i++) JButton addButton=new JButton("add"+i); buttonPanel. add(addButton); Container contentPane=getContentPane(); contentPane. add(buttonPanel); public static final int WIDTH=350; public static final int HEIGHT=200; private int buttons;

查看答案
更多问题

The Rise of RPHistorical reasons Received pronunciation was originally associated with a【1】spoken in the region between central England and London, including Oxford and Cambridge. Its survival was due to its use by the【2】in the 14th century and by university students in the【3】Ages. Its rise in importance resulted from its application in government and official documents. The prestige of its【4】pattern of pronunciation came about with its use in【5】schools in the 19th century. As a result, its【6】is accepted by television and the radio, the professions and teaching English as a foreign language.Three characteristics of RP 1) its speakers don’’t regard themselves as connected with any geographical region; 2) RP is largely used in England; 3) RP is a "class" accent, associated with【7】social classes.Its present status Decline in the prestige of RP is the result of a) loss of monopoly of education by the privileged; b) 【8】 of high education in the post-war period. However, it still retains its eminence among certain professional people. There is a rise in the status of all【9】accents. We are moving towards the【10】position: general acceptance of all regional accents and absence of a class accent that transcends all regions.

本题提取字符串“china is a great country.”中的前5个字符生成一个新的字符串,并将剩余字符组成另外一个新的字符串,最后将两个新的字符串连接输出。 public class java1 public static void main(String[] args) String str="China is a great country."; headstr=str. substring(______); trailstr=str. substring(______); System. out. println(headstr+trailstr)

Who will be consulted first before the EU list is submitted to WTO

A. EU member states.
B. The United States.
C. WTO.
D. The steel corporations.

某邮政局对市内用户用邮满意度情况进行调查,得到的统计数据显示,造成邮政通信质量低的因素主要有:①邮件传递超过规定时限;②邮件传递出现丢失、损毁现象;③邮局分布的密度较低;④邮局的营业时间较短;⑤邮局经营的业务种类偏少;⑥管理、组织、技术工作及其他问题。这几个因素造成的质量问题所占的百分比分别为35%、7%、30%、12%、6%、10%。 该邮政局调查的儿个因素中,体现邮政服务方便性的因素有( )。

A. 邮局的营业时间
B. 管理、组织与技术工作
C. 邮局分布的密度
D. 邮局经营的业务种类

答案查题题库