问题 填空题

下面是生成一个依赖窗口的对话框,属性为modal,请把所缺的代码补齐。 import java.awt.*; public class DialogDemo extends Frame {DialogDemo ( ){ SetTitle ("Demo"); Panel p=new Panel(); p.add(new label ("one")); p.add(new Checkbox("two")); add ("North",p); add ("Center", new TextArea ("three", 3,10)); Dialog d=new Dialog(this,"a cat", 【12】 ); d.add("North",new Label ("Modal dialog"); d.add("Center",new TextArea("hello"); d.pack (); d.show();}public static void main(String args[] ){ DialogDemo f=new DialogDemo(); f.pack(); f.show ();} }

答案

参考答案:true

解析: 本题是考查对话框的有关属性和使用方法。Dialog是Window的子类,它表示一个对话窗口。与Frame不同,它的存在依赖于其他窗口,当它所依赖的窗口被关闭时,对话框也消失。当指定的对话框为modal,这时当对话框出现时,用户只能对它进行操作,而不能对其他窗口进行操作。Dialog的构造方法如下 Dialog(Frame parent,Boolean modal); Dialog(Frame parent,String title,Boolean modal);

阅读理解

阅读理解

     According to some researchers, you should not praise children for everything that they do. It does not

help them build self-confidence.

     Most parents and teachers agree that praise can help increase children's self-confidence -the more, the better. However, according to some researchers, only proper praise is good for children. If adults praise

everything children do, it makes children look for praise all the time, not trying to do their best. "Teachers

should not say things like 'good job' or 'nice work' whenever a child does anything. They should encourage them to continue to improve," some researchers advise.

     Another idea is that children with high self-confidence are happier, and do better at school. About this, Marshall Duke, a researcher in children, says, "High self-confidence brought in by too much praise does

not make children happier, get more, or become able to do more. Finding a child's advantages (强项) and developing them can help build confidence more than too much praise can." Praise also loses its effect

(影响) if it is given equally to all students.

     "It's important to tell children the truth about what they've done. Honest feedback (反馈) is far better

than empty praise," Duke adds. "People have got into the habit of not telling children when they're wrong. That makes it hard for them to deal with difficulties when they grow up. That's just how the world is."

1. According to some researchers, if parents praise their children too much, their children will ______.

A. always look for praise

B. increase self-confidence

C. become strong

D. do better in their studies

2. In order to help children build self-confidence, some researchers advise parents to ______.

A. make them live more happily

B. let them do more difficult work

C. help them do better in school

D. encourage them to improve

3. Which of the following is TRUE, according to the passage?

A. Praise makes children become successful.

B. Children don't know what they're really good at.

C. The same praise for all children has no meaning.

D. Duke thinks praise is more important than finding children's strengths.

4. What is the last paragraph about?

A. It's important to have the habit of praising children.

B. Children should know their mistakes as soon as possible.

C. We should praise children honestly and tell them their mistakes.

D. What children with high self-confidence are like.

单项选择题