maindialog.java
来自「java开源邮件服务器 smtp pop3」· Java 代码 · 共 72 行
JAVA
72 行
import java.net.*;
import java.io.*;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
/**
990327 Broken out of main DixieMail Routine
**/
/**
* A form for obtaining user input. Customize this for your application, just
* as you would customize an HTML form for a Web-based e-mail application.
*/
class MainDialog extends Panel
{
private TextArea msgBodyArea;
private int nRows;
private boolean stop = false;
/**
* The constructor
*/
synchronized public void clearLog()
{
msgBodyArea.setText( "" );
}
synchronized public void append( String text )
{
msgBodyArea.setText( msgBodyArea.getText()+text+"\n" );
msgBodyArea.setRows( ++nRows );
}
synchronized public void showStatus( boolean stat )
{
msgBodyArea.setVisible( stat );
}
public MainDialog()
{
BorderLayout pbl;
BorderLayout formbl;
setLayout( formbl = new BorderLayout() );
// Create a panel to put the text fields and button on
Panel p = new Panel();
p.setLayout( pbl = new BorderLayout() );
pbl.setVgap( 3 );
formbl.setVgap( 2 );
formbl.setHgap( 2 );
// Instantiate all the elements, and add them to their containers...
msgBodyArea = new TextArea();
p.add( msgBodyArea, "Center" );
add(p);
nRows = 1;
msgBodyArea.setRows( nRows );
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?