The command BU (Control B, -then U) underlines text.

A:type B:password C:program D:instruction

The {{U}}command{{/U}} BU (Control B, -then U) underlines text.

A:type B:password C:program D:instruction

When you open a file or run a program in a computer, a window appears on the desktop of your computer. The () of the window indicates which program you are currently working in arid its color will become blue if a window is active. When you click on The () , the window disappears and appears as a button on the taskbar. Clicking on a button in () will invoke a specific command.

When you click on The () , the window disappears and appears as a button on the taskbar.

A:maximize button B:restore button C:close button D:minimize button

下列程序用GridLayout布局管理器将Frame分为1行3列,并放入Button构件,横线处应填入的语句是( )。
import java.awt.*;
public class Test
public static void main (String[] args)
Frame frm=new Frame ("GridLayout");
____________
frm.add (new Button("Button1"));
frm.add (new Button("Button2"));
frm.add (new Button("Button3"));
frm.setSize (300,300);
frm.setVisible (true);

A:frm.setLayout (GridLayout (1,3)); B:setLayout (new GridLayout(1,3)); C:frm.setLayout (new GridLayout(3,1)); D:frm.setLayout (new GridLayout(1,3));

下列程序实现了2个__接口:ActionListener和W1ndowListener。 import java.awt.*; import java.awt.event.*; public class ex39______ { public static void main(String[] args) { ex39 obj = new ex39( ); obj .go( ); } public void go( ) { Frame f = new Frame("ex39"); f.addWindowListener(this); Button b = new Button("Button"); b.addActionListener(this); f.add(b); f.pack( ); f.setVisible(true); } public void actionPerformed(ActionEvent e) { System.out.println("Button pressed!"); } public void windowActivated(WindowEvent e){} public void windowDeactivated(WindowEvent e){} public void windowClosed(WindowEvent e) {} public void windowClosing(WindowEvent e){System.exit(1); public void windowIconified(WindowEvent e){} public void windowDeiconified(WindowEvent e) {} public void windowOpened(WindowEvent e){} } 请选择正确的语句填入横线处。

A:extends ActionListener, WindowListener B:implements ActionListener, WindowListener C:implements ActionListener; WindowListener D:extends ActionListener; WindowListener

下列程序采用BorderLayout布局管理,选择正确的语句填入横线处,实现在North区域显示一个名字为“北方”的Button构件。 import java.awt.*; public class ex48 { public static void main(String[] args) { frame frm = new Frame ("北方"); frm.setLayout(new BorderLayout( )); frm.setSize(200, 200); frm.setVisible(true); } }

A:add("Nouth", new Button("北方")); B:fradd("South", new Button("北方")); C:fradd("Nouth", new Button("北方")); D:Fradd("South", Button("北方"));

下列程序在Frame中设定BorderLayout布局管理器,选择正确的语句填入程序的横线处。 import java.awt.*; public class ex43 extends Frame { public static void main(String[] args) { ex43 obj = new ex43("BorderLayout"); ______ obj.add("North", new Button("North")); obj.add("South", new Button("Sourth")); obj.add("East", new Button ("East")); obj.add("West", new Button ("West")); obj. add ("Center", new Button ( "Center" ) ); obj.pack( ); obj. setVisible (true); } public ex43(String str) { super (str); } }

A:obsetLayout(new BorderLayout()); B:setLayout(new Borderkayout()); C:setLayout(BorderLayout()); D:obsetLayout(BorderLayout());

下列程序用GridLayout布局管理器将Frame分为1行3列,并放入Button构件,横线处应填入的语句是( )。 import java.awt.*; public class Test { public static void main (String[] args) { Frame frm=new Frame ("GridLayout"); ____________ frm.add (new Button("Button1")); frm.add (new Button("Button2")); frm.add (new Button("Button3")); frm.setSize (300,300); frm.setVisible (true); } }

A:frsetLayout (GridLayout (1,3)); B:setLayout (new GridLayout(1,3)); C:frsetLayout (new GridLayout(3,1)); D:frsetLayout (new GridLayout(1,3));

描述以下的applet: import java.applet.Applet; import java.awt.event.*; import java.awt.*; public class MyApplet extends Applet { Button b1, b2; public void init( ) { ActionListener a = new ActionListener( ) { public void actionPerformed(ActionEvent evt) { if(evt.getSource( ) == bl) { b1.setEnabled(false); b2.setEnabled(true); } else { b1.setEnabled(true); b2.setEnabled(false); } } } b1 = new Button("1"); b1.addActionListener(a); add(b1); b2 = new Button("2"); b2.addActionListener(a); add(b2); } } 选择所有正确的答案______。

A:applet上只有一个按钮,但它什么都不做 B:applet上什么也没有 C:applet上有两个按钮,当用户单击一个按钮时,它将成为disabled:当用户单击另一个按钮时,另一个将成为enabled D:当用户单击按钮时,什么都不会发生

下列Applet在窗口中放置2个Button,标签分别为“东”和“西”,在窗口中的位置与它们的名字相同。选择正确的语句填入横线处。 import java.awt.*; import java.applet.*; public class ex16 extends Applet { Button e, w; public void init( ) { e = new Button("东"); w = new Button("西"); add("East", e); add("West", w); } }

A:setLayout(new BoxLayout()); B:setLayout(new FlowLayout()); C:setLayout(new BorderLayout()); D:setLayout(new GridLayout());

微信扫码获取答案解析
下载APP查看答案解析