📄 indexbeanlistener.java
字号:
//spackage beans;
import java.beans.*;
public class IndexBeanListener implements VetoableChangeListener
{
public void vetoableChange(PropertyChangeEvent ve)throws PropertyVetoException
{
Object temp=ve.getNewValue();
if(temp instanceof String)
{
String t=(String)temp;
if(t.equals("tmd"))
{
System.out.println("不能说脏话");
throw new PropertyVetoException("脏话",ve);
}
}
else
{
String[]tv=(String[])temp;
for(int cn=0;cn<tv.length;cn++)
{
if(tv[cn].equals("tmd"))
{
System.out.println("不能说脏话");
throw new PropertyVetoException("脏话",ve);
}
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -