資源簡介
Java 把異常與錯誤信息顯示到窗體中(基礎篇-實例077).zip
代碼片段和文件信息
import?java.awt.EventQueue;
import?java.awt.event.ActionEvent;
import?java.awt.event.ActionListener;
import?java.io.ByteArrayOutputStream;
import?java.io.PrintStream;
import?javax.swing.JButton;
import?javax.swing.Jframe;
import?javax.swing.JLabel;
import?javax.swing.JPanel;
import?javax.swing.JScrollPane;
import?javax.swing.JTextArea;
import?javax.swing.JTextField;
import?javax.swing.border.EmptyBorder;
public?class?frameShowException?extends?Jframe?{
????
????private?JPanel?contentPane;
????private?JTextField?textField;
????private?JTextArea?textArea;
????
????/**
?????*?Launch?the?application.
?????*/
????public?static?void?main(String[]?args)?{
????????EventQueue.invokeLater(new?Runnable()?{
????????????public?void?run()?{
????????????????try?{
????????????????????frameShowException?frame?=?new?frameShowException();
????????????????????frame.setVisible(true);
????????????????}?catch?(Exception?e)?{
????????????????????e.printStackTrace();
?????????
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????????301??2010-07-17?16:21??.classpath
?????文件?????????379??2010-09-07?13:45??.project
?????文件?????????635??2010-07-17?16:21??.settings\org.eclipse.jdt.core.prefs
?????文件?????????737??2013-11-21?08:40??bin\fr
?????文件?????????696??2013-11-21?08:40??bin\fr
?????文件????????3503??2013-11-21?08:40??bin\fr
?????文件????????3540??2010-07-19?11:37??src\fr
- 上一篇:Java 查找特定的列表元素
- 下一篇:Java 刪除表格中選中的行
評論
共有 條評論