⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 helpdlg.java

📁 MPICH是MPI的重要研究,提供了一系列的接口函数,为并行计算的实现提供了编程环境.
💻 JAVA
字号:
import com.sun.java.swing.*;import java.awt.*;import java.awt.event.*;/** * This class implements a help dialog. The lines of text to be displayed * in this dialog are passed on as a single string, lines seperated by '/n's */class HelpDlg extends JDialog implements ActionListener {  private String text;  private JTextArea area;    /**   * Constructor   */  public HelpDlg (Frame p, String s) {    super (p, "Help", false);    text = s;    setup ();  }    private void setup () {    setupData ();    setupPanel ();        addWindowListener (new WindowAdapter () {      public void windowClosing (WindowEvent e) {setVisible (false);}    });  }  private void setupData () {    area = new JTextArea (text, 8, 40);    area.setEditable (false);    area.setBackground (Color.white);    area.setForeground (Color.black);    area.setCursor (new Cursor (Frame.DEFAULT_CURSOR));  }    private void setupPanel () {    JScrollPane scroller = new JScrollPane();    scroller.getViewport().add(area);    getContentPane ().add (scroller, "Center");    getContentPane ().add (new MyButton ("Close", this), "South");    pack ();  }    public void actionPerformed (ActionEvent evt) {    String command = evt.getActionCommand ();    if (command.equals ("Close")) setVisible (false);  }}  

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -