问题 选择题

“……至于中国所有好战精神,尚未完全丧失,可于此次‘拳民运动’中见之。在山东直隶两省之内,至少当有十万人数……”此运动是(   )

A.太平天国运动

B.义和团运动

C.维新变法运动

D.五四运动

答案

答案:B

题目分析:分析题干,给出了关键信息,如:“好战”、“拳民运动”、“山东直隶”等,太平天国运动主要是在南方活动,维新变法运动是少数知识分子参与进行的改革运动,五四运动是一场反帝爱国运动,但没有进行战争,均与题干所述不符,答案为B。

点评:此题难度不大,解题关键是抓住题干所给关键信息,再和选项中各个事件特征一一比对,得出答案。

单项选择题 A1型题
问答题

本题的功能是通过按钮来选择窗口显示的风格。窗口中有三个按钮:“Metal”、“Motif”和“Windows”,单击任何一个按钮,就能将窗口的风格改变为按钮名称所对应的风格。
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
class PlafPanel extends JPanei implements ActionListener
public______()
metalButton=new JButton("Metal");
motifButton=new JButton("Motif");
windowsButton=new JButton("Windows");
add(metalButton);
add(motifButton);
add(windowsButton);
metalButton.addActionListener(this);
motifButton.addActionListener(this);
windowsButton.addActionListener(this);

public void actionPerformed(ActionEvent evt)
Object source=evt.getSource();
String plaf="";
if(source==metalButton)
plaf="javax.swing.plaf.metal.MetalLookAndFeel";
else if(source==motifButton)
plaf="com.sun.java.swing.plaf.motif.MotifLookAndFeel";
else if(source==windowsButton)
plaf="com.sun.java.swing.plaf.windows.WindowsLookAndFeel";
try
UIManager.setLookAndFeel(______);
SwingUtilities.updateComponentTreeUI(this);

catch(Exception e)

private JButton metalButton;
private JButton motifButton;
private JButton windowsButton;

class PlafFrame extends JFrame
public PlafFrame()
setTitle("simple");
setSize(300,200);
addWindowListener(new WindowAdapter()
public void windowClosing(WindowEvent e)
System.exit(0);

);
Container contentPane=getContentPane();
contentPane.add(new PlafPanel());


public class java2
public static void main(String[]args)
JFrame frame=new PlafFrame();
frame.show();