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

📄 mytextfield.java

📁 MPICH是MPI的重要研究,提供了一系列的接口函数,为并行计算的实现提供了编程环境.
💻 JAVA
字号:
import java.awt.Color;import javax.swing.JTextField;import javax.swing.JLabel;//This class extends TextField to put background and foreground//colors to the TextField and make it editable according to the options.public class MyTextField extends JTextField {  public MyTextField (boolean b) {super (); setup (b);}  public MyTextField (String text, boolean b) {super (text); setup (b);}  public MyTextField (int columns, boolean b) {super (columns); setup (b);}  public MyTextField (String text, int columns, boolean b) {    super (text, columns);    setup (b);  }  void setup (boolean b) {    this.setBackground (Color.white);    this.setForeground (Color.black);    this.setEditable (b);  }}class MyJLabel extends JLabel {  public MyJLabel (String s) {super (s);}    public MyJLabel (String s, int columns) {    super ();    StringBuffer t = new StringBuffer (s);    int len = t.length ();        if (len < columns)      for (int i = 0; i < (columns - len); i++) t.append (' ');    else if (len > columns)       t.setLength (columns);        setText (t.toString ());  }    public MyJLabel (int columns) {    super ();    StringBuffer t = new StringBuffer ();        for (int i = 0; i < columns; i++) t.append (' ');    setText (t.toString ());  }}

⌨️ 快捷键说明

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