showtextdialog.java

来自「基于JavaMail API 实现的桌面程序,邮件收发器」· Java 代码 · 共 37 行

JAVA
37
字号
/*
 * showTextDialog.java
 *
 * Created on 2006年5月25日, 下午1:39
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package javamail;
import javax.swing.*;
import javax.swing.event.*;
import java.io.*;
/**
 *
 * @author freezing
 */
public class showTextDialog extends JDialog{
    private javax.swing.JTextArea ta;
    private javax.swing.JScrollPane scroll;
    /** Creates a new instance of showTextDialog */
    public showTextDialog() {
        super();
        ta=new JTextArea();
        scroll=new JScrollPane();
        scroll.getViewport().add(ta);
        this.add(scroll);
        this.setTitle("信件内容如下:");
        this.setSize(400,400);
        this.setLocation(100,100);
    }
    public void setContent(String str)
    {
        ta.setText(str);
    }
}

⌨️ 快捷键说明

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