claimclass.java

来自「基于JAVA的简单扫描器」· Java 代码 · 共 40 行

JAVA
40
字号
package Scanner;
import javax.swing.*;
import javax.swing.event.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.border.*;
class claimclass extends JFrame
{private JTextArea text=new JTextArea("CONTEXT:",20,20);
 private JDialog fh=new JDialog (this,"声明内容----By Liuyi");
 private String s1="Program designed by Liuyi Computer Science 0403!";
 private String s2="You can't attribute to the program without the permission!";
private char ch='\012';
 private String sb;
 public claimclass()
	{fh.setSize(300,200);
		fh.setLocation(350,300);
		
		text.setBackground(Color.gray);
	 text.setForeground(Color.yellow);
	 text.setEditable(false);
	 fh.add(text);
	 s1=s1.concat(Character.toString(ch));
	 s1=s1.concat(s2);
	 sb=text.getText().concat(Character.toString(ch));
	 sb=sb.concat(s1);
	 text.setText(sb);
	 fh.setSize(350,100);
	 fh.setVisible(true);
		fh.addWindowListener 
(new WindowAdapter () 
{ 
public void windowClosing (WindowEvent e) 

{ 
fh.setVisible(false);
} 

}); 
}
}

⌨️ 快捷键说明

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