Which file should be edited to manually add a printer?()A./etc/prtconfB./etc/qconfigC./etc/lpconfigD./etc/prtconfig

题目
Which file should be edited to manually add a printer?()

A./etc/prtconf

B./etc/qconfig

C./etc/lpconfig

D./etc/prtconfig


相似考题
更多“Which file should be edited to manually add a printer?() ”相关问题
  • 第1题:

    Manually,yousettheconsumergroupofallofthenewlycreateduserstoMYDB_GRP.Youwanttheuserstobeabletochangetheirconsumergroupsaspertheapplicationrequirement.Whatwasthefirststepthatwasneededintheprocesstoachievethisobjective?()

    A.TheusermusthavebeengrantedtheDBArole.

    B.Theusermusthavebeengrantedtheswitchprivilegeasapartofarole.

    C.TheusermusthavebeengrantedtheResourceManageradministratorprivilege.

    D.TheusermusthavebeengrantedtheswitchprivilegebyusingtheDBMS_RESOURCE_MANAGER_PRIVSpackage.


    参考答案:D

  • 第2题:

    本程序的功能是监听对于菜单项和工具条按钮的操作。主窗口中有菜单、工具条和一个文字标签,菜单中有“文件”项,“文件”菜单中包括菜单项“新建”、“保存”、“打印”、“页面设置”和“退出”,工具条上包括按钮“新建”、“保存”、“打印”、“页面设置”和“退出”。单击任何一个菜单项或任何一个工具条按钮,文字标签都会显示哪个构件被选中。请更正题中带下划线的部分。运行结果如下图所示。

    注意:不改变程序的结构,不得增行或删行。

    import javax.swing.*;

    import java.awt.*;

    import java.awt.event.*;

    public class advance extends JFrame

    {

    private JLabel actionlnfo;

    public advance(String titleText)

    {

    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

    super(titleText);

    actionInfo=new JLabel("事件信息");

    JToolBar tb=new JTooBar();

    Menu file=new Menu( "文件" );

    JMenuBar mb=new JMenuBar();

    mb.add(file);

    NewAction na=new NewAction(actionInfo);

    file.add(na);

    tb.add(na);

    SaveAction sa=new SaveAction(actionInfo);

    file.add(sa);

    tb.add(sa);

    PrintAction pta=new PrintAction(actionInfo);

    file.add(pra);

    tb.add(pra);

    PageSetAction psa=new PageSetAction(actionInfo);

    file.add(psa);

    tb.add(psa);

    ExitAction ea=new ExitAction(actionInfo);

    file.add(ea);

    tb.add(ea);

    setJMenuBar(mb);

    Container cp=getContentPane();

    cp.setLayout(new BorderLayout());

    cp.add(tb);

    cp.add(actionInfo, BorderLayout.CENTER );

    setSize(350, 200);

    setVisible(true);

    }

    public static void main(String[] args)

    {

    new advance("advance");

    }

    }

    class NewAction extends AbstractAction

    {

    JLabel label;

    public NewAction(JLabel label)

    {

    super("新建");

    this.label=label;

    }

    public void actionPerformed(ActionEvent e)

    {

    label.setText("您选择了新建");

    }

    }

    class SaveAction extends AbstractAction

    {

    JLabel label;

    public SaveAction(JLabel label)

    {

    super("保存");

    this.label=label;

    }

    public void actionPerformed(ActionEvent e)

    {

    label.setText ("您选择了保存");

    }

    }

    class printAction extends AbstractAction

    {

    JLabel label;

    public PrintAction(JLabel label)

    {

    super("打印");

    this.label=label;

    }

    public void actionPerformed(ActionEvent e)

    {

    label.setText ("您选择了打印");

    }

    }

    class PageSetAction extends AbstractAction

    {

    JLabel label;

    public pageSetAction(JLabel label)

    {

    super("页面设置");

    this.label=label;

    }

    public void actionPerformed(Actio


    正确答案:setTitle(titleText) JMenu file=new JMenu("文件") cp.add(tbBorderLayout.NORTH)或cp.add("North"tb)
    setTitle(titleText) JMenu file=new JMenu("文件") cp.add(tb,BorderLayout.NORTH)或cp.add("North",tb) 解析:本题考查知识点:类的继承、AWT和Swing的区别、布局管理器的使用。解题思路:程序中声明了一个菜单构件、一个工具栏构件,声明了5个事件添加到菜单和工具栏中。子类继承父类以后,可以调用父类的public、protected成员变量和成员方法。子类还可以使用变量super,访问已经被隐藏或被覆盖了的父类成员变量和方法。题中,JFrame带一个参数的构造方法已经被子类advance的构造方法覆盖。原题打算使用super调用父类的构造方法,为框架添加变量titleText定义的名字。这样的操作可以实现,但是super变量要求必须写在其所在的方法的第一行,而本题中super变量前还有语句setDefaultCloseOperation。因此在第1条下划线的位置不能使用super,只能调用set Title()方法,该方法可以为框架设置名字。file是一个AWT构件Menu的对象,而它所在的容器mb是一个Swing的JMenuBar对象,两类不同的构件,实现的方法不一样,不能使用add方法进行添加。因此在第2条下划线处需要把file的类型改为JMenu。容器定义了BorderLayout布局管理器以后,如果添加构件时不指明添加的位置,则会把该构件添加到Center的位置。由于本题中不需要把名为actionInfo的JLabel构件添加到Center的位置,所以在第3条下划线处,添加tb构件时必须指明位置参数。本题答案中根据习惯把工具栏添加到容器的顶部,当然,添加到容器的South、East或West位置也都正确。

  • 第3题:

    ________ the vessel have no safety radiotelegraphy certificate at the time of her delivery,she ________ be held to be unseaworthy.

    A.If/may

    B.Will/shall

    C.Should/would

    D.Would/should


    正确答案:C

  • 第4题:

    From your Windows 2000 Professional computer, you need to print from a 16-bit accounting application to a network printer named Printer02. Printer02 is attached to a print server named PrtSrv. The accounting application allows you to print only to a local LPT port.

    You currently have two printers attached to your local LPT1 and LPT2 ports. You need to be able to print to the network printer and to both local printers. You install the driver for the network printer on your computer.

    What must you do next to enable printing on the network printer?

    A.Create a new local printer port named PrtSrv\Printer02, and configure the printer to use the new port.

    B.Create a new local printer port named PrtSrv\Printer02. In the properties for the new port, select the option to print directly to the printer. Configure the printer to use the new port.

    C.Run thenet use Lpt3: \\PrtSrv\Printer02command.

    D.Run thenet print\\PrtSrv\Printer02command.


    正确答案:C
    解析:Explanation: The net use command is the only method available for accessing a network printer from client computers that are running 16-bit DOS applications.

    Incorrect Answers:
    A: Legacy 16-bit DOS programs cannot use new local printer ports. They can only use the LPT1, LPT2, LPT3 or LPT4 ports. Those ports have to be used with the net use command.

    B: Legacy 16-bit DOS programs cannot use new local printer ports. They can only use the LPT1, LPT2, LPT3 or LPT4 ports. Those ports have to be used with the net use command.

    D: Net print displays or controls print jobs and print queues. It is not used to perform. the actual printing.

  • 第5题:

    以下程序是一个简单文本处理器,菜单项可以打开、编辑、保存一个文件。文件内容显示在下面的文本区域中(提示,打开文件通过文件选择器来完成)。请改正程序中的错误(有下划线的语句),使程序能输出正确的结果。运行结果如下图所示。

    注意:不改动程序的结构,不得增行或删行。

    import java.awt.*;

    import java.awt.event.*;

    import java.io.* ;

    import javax.swing.*;

    class FileFrame. extends JFrame

    {

    File file;

    JTextPane textpane;

    FileInputStream readStream;

    JScrollPane scroll;

    public FileFrame()

    {

    super ("文件浏览");

    JMenu fileM = new JMenu("文件");

    OpenAction pen = new OpenAction ();

    SaveAction clear = new SaveAction ();

    ExitAction exit = new ExitAction();

    JMenuBar mb = new JMenuBar();

    fileM.add(open);

    fileM.add(clear);

    fileM.add(exit);

    mb.add(fileM);

    textpane=new JTextPane();

    scroll=new JScrollPane(textpane);

    getContentPane().add(scroll);

    getContentPane().addJMenuBar(mb);

    }

    class OpenAction extends AbstractAction

    {

    public OpenAction ()

    {

    super("打开");

    }

    public void actionPerformed( ActionEvent e )

    {

    JFileChooser chooser=new JFileChooser();

    int state=chooser.showOpenDialog(null);

    file=chooser.selectedFile();

    if(file!=null&&state==JFileChooser.APPROVE_OPTION)

    {

    try

    {

    readStream=new FileInputStream(file);

    textpane.read(readStream, this);

    readStream.close();

    }

    catch(IOException ioE){}

    }

    }

    }

    class SaveAction extends AbstractAction

    {

    public SaveAction()

    {

    super("保存");

    }

    public void actionPerformed( ActionEvent e )

    {

    if(file==null)

    return;

    try{

    FileWriter ut = new FileWriter(file);

    out.read(textpane.getText());

    out.close();

    }

    catch (IOException ioE)

    {}

    }

    }

    class ExitAction extends AbstractAction

    {

    public ExitAction()


    正确答案:①setJMenuBar(mb) ②file=chooser.getSelectedFile() ③out.write(textpane.getText())
    ①setJMenuBar(mb) ②file=chooser.getSelectedFile() ③out.write(textpane.getText()) 解析:构造方法FileFrame()中初始化了程序界面,菜单“fileM”中添加了3个菜单项“打开”、“保存”和“退出”,并为这3个菜单项添加了相应的事件。“textpane”是一个文本编辑面板,其上可以显示和修改文本。openAction类定义了用户选择“打开”菜单的事件。用户选择“打开”,程序向用户显示文件选择器“chooser”,使用户通过图形化的方式选择文件。根据用户选择的结果,生成File类的实例“file”。语句“textpane.read(readStream,this)”读取文件内容并显示在“textpane”中。 SaveAction定义了用户选择“保存”菜单的事件。在SaveAction类中,程序调用FileWriter的写文件方法将“textpane”中的内容输出到文件中。
    玻璃面板(glassPane)、内容面板(contentPane)、菜单条(JMenuBar)共同组成根面板。getContentPane()获得的是顶层容器的内容面板而不是根面板,所以不能在其中添加菜单条。因此第 1 条下划线处应该改为 setJMenuBar(mb),将“mb”设置为根面板的菜单条。
    第2处和第3处改错,主要考查对文件选择和文件输出的基本操作的掌握情况。这些常用的类和常用的方法只有在多次练习之后才能熟练掌握。

  • 第6题:

    ______ it rain tomorrow moring, the loading ______.

    A.Should / will be postponed

    B.If / shall be postponed

    C.Should / would be postponed

    D.If / has to be postponed


    正确答案:C
    一旦明天早上下雨,装货将被延迟。