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

📄 maindialog.java

📁 java开源邮件服务器 smtp pop3
💻 JAVA
字号:
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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -