資源簡介
編寫java程序,在文本框輸入字符串,點擊“添加”按鈕,文本區顯示文本框中內容;點擊“清空”按鈕,清除文本區所有內容。
代碼片段和文件信息
import?java.applet.*;
import?java.awt.*;
import?java.awt.event.*;
public?class?Syaa?extends?applet?implements?ActionListener
{
???TextArea?a1=new?TextArea(550);
???Label?t1=new?Label(“請向文本域中添加一行…“);
???TextField?tf=new?TextField(50);
???Button?b1=new?Button(“添加“);
???Button?b2=new?Button(“清空文本域“);
public?void
- 上一篇:文件共享服務器
- 下一篇:commons-compress.jar包
評論
共有 條評論