\[A\] apply\[B\] contribute\[C\] transfer\[D\] connect

题目

\[A\] apply\[B\] contribute\[C\] transfer\[D\] connect


相似考题

2.本题中,通过菜单“Connect”显示一个对话框,单击“ok”按钮后,所填写的内容就会传回到主窗口并显示出来。import java.awt.*import java.awt.event.*;import javax.swin9.*;public class java3 extends JFrame. implements ActionL-istener{public java3(){setTitle("java3");setSize(300,300);addWindowListener(new WindowAdapter(){public void windowClosing(WindowEvent e){System.exit(0);}});JMenuBar mbar = new JMenuBar();setJMenuBar(bar);JMenu fileMenu=new JMenu("File");mbar.add(fileMenu);connectltem=new JMenuhem("Connect");connecthem.addActionListener(this);fileMenu.add(connecthem);exithem=new JMenuhem("Exit");exithem.addActionListener(this);fileMenu.add(exithem);}public void actionPerformed(ActionEvent evt){Object source=evt.getSource();if(source= =connecthem){Connectlnfo transfer=new ConnectInfo ("your-name","pw");if(dialog= =null)dialog=new ConnectDialog(this);if(dialog.showDialog(transfer)){String uname=transfer.username;String pwd=transfer.password;Container contentPane=getContentPane();contentPane.add(new JLabel("username="+uname+",password="+pwd),"South");validate();}}else if(source= =exitltem)System.exit(0);}public static void main(String[]args){JFrame. f=new java3();f.show();}private ConnectDialog dialog=null;private JMenuhem connecthem;private JMenuhem exithem;}class Connectlnfo{public String username;public String password;public Connectlnfo(String U,String p){username=u;password=P;}}class ConnectDialog extends JDialog implements Ac-tionListener{public ConnectDialog(){super(parent,"Connect",true);Container contentPane=getContentPane();JPanel pl=new JPanel();pl.setLayout(new GridLayout(2,2));pl.add(newJLabel("User name:"));pl.add(username=new JTextField(""));pl.add(new JLabel("Password:"));pl.add(password=new JPasswordField(""));contentPane.add("Center",pl);Panel p2=new Panel();okButton=addButton(p2,"ok");cancelButton=addButton(p2。"Cancel");contentPane.add("South",p2);setSize(240,120);}JButton addButton(Container C,String name){JButton button=new JButton(name);button.addActionListener(this);C.add(button);return button;}public void actionPerformed(ActionEvent evt){object source=evt.getSource();if(source= =okButton){ok=true:setVisible(false);}else if(source= =cancelButton)setVisible(false);}public void showDialog(Connectlnfo transfer){username.setText(transfer.username);password.setText(transfer.password);ok=false;show();if(ok){transfer.username=username.getText();transfer.password=new String(password.get-Password());}return ok;}private JTextField usernameprivate JPasswordField password;private boolean ok;private JButton okButton;private JButton cancelButton;}

更多“\[A\] apply\[B\] contribute\[C\] transfer\[D\] connect ”相关问题
  • 第1题:

    I will draft a letter for you.

    A:clarify
    B:formulate
    C:revise
    D:contribute

    答案:B
    解析:
    本句意思:我将为你草拟一封信。draft起草,草拟。clarify澄清,使清楚;formulate制订,规划,构想;revise修订,修改;contribute捐赠(款项),投稿。

  • 第2题:

    I'll draft a letter for you.

    A:clarify
    B:formulate
    C:revise
    D:contribute

    答案:B
    解析:
    本句意思:我来为你草拟一封信。draft意为“起草,设计”,与formulate(制定,构思)意思相近。clarify澄清;revise修改,修订;contribute做贡献,起作用。

  • 第3题:

    下列关于apply方法说法正确的是()。

    A.apply方法是对DataFrame每一个元素应用某个函数的

    B.apply方法能够实现所有aggregate方法的功能

    C.apply方法和map方法都能够进行聚合操作

    D.apply方法只能够对行列进行操作


    D apply方法只能够对行列进行操作

  • 第4题:

    The bank services _________the expansion of trade both inside and out of a nation.

    A. contribute to
    B. attribute with
    C. devote with
    D. contribute

    答案:A
    解析:
    考查词义辨析。句意:银行的多种服务有助于扩大国内外贸易。contribute to有助于;促进;contribute 作及物动词,表示“捐助”;devote 致力于;奉献,常用于devote to...。

  • 第5题:

    I'm very glad to draft the letter for you.

    A:revise
    B:clarify
    C:formulate
    D:contribute

    答案:C
    解析:
    本句意思:我很乐意为你草拟这封信。draft意为“起草,草拟”,与formulate(制订)意思相近。revise修改,修订;clarify澄清;contribute做贡献,起作用。