📄 warning.java
字号:
import com.ms.wfc.app.*;
import com.ms.wfc.core.*;
import com.ms.wfc.ui.*;
import com.ms.wfc.html.*;
/**
* This class can take a variable number of parameters on the command
* line. Program execution begins with the main() method. The class
* constructor is not invoked unless an object of type 'Warning'
* created in the main() method.
*/
public class Warning extends Form
{
public Warning()
{
super();
// Required for Visual J++ Form Designer support
initForm();
// TODO: Add any constructor code after initForm call
}
/**
* Warning overrides dispose so it can clean up the
* component list.
*/
public void dispose()
{
super.dispose();
components.dispose();
}
private void button1_click(Object source, Event e)
{
this.setDialogResult(DialogResult.OK);
}
/**
* NOTE: The following code is required by the Visual J++ form
* designer. It can be modified using the form editor. Do not
* modify it using the code editor.
*/
Container components = new Container();
Label label1 = new Label();
Label label2 = new Label();
Button button1 = new Button();
private void initForm()
{
label1.setBackColor(Color.RED);
label1.setFont(new Font("宋体", 26.0f));
label1.setForeColor(Color.YELLOW);
label1.setSize(new Point(376, 40));
label1.setTabIndex(0);
label1.setTabStop(false);
label1.setText("注意");
label2.setFont(new Font("宋体", 12.0f));
label2.setLocation(new Point(72, 72));
label2.setSize(new Point(216, 32));
label2.setTabIndex(1);
label2.setTabStop(false);
label2.setText("请确认输入的数据皆为自然数");
label2.setTextAlign(HorizontalAlignment.CENTER);
button1.setLocation(new Point(136, 128));
button1.setSize(new Point(88, 24));
button1.setTabIndex(2);
button1.setText("确认");
button1.addOnClick(new EventHandler(this.button1_click));
this.setText("Warning");
this.setAcceptButton(button1);
this.setAutoScaleBaseSize(new Point(6, 12));
this.setBorderStyle(FormBorderStyle.FIXED_TOOLWINDOW);
this.setClientSize(new Point(357, 194));
this.setStartPosition(FormStartPosition.CENTER_SCREEN);
this.setNewControls(new Control[] {
button1,
label2,
label1});
}
/**
* The main entry point for the application.
*
* @param args Array of parameters passed to the application
* via the command line.
*/
public static void main(String args[])
{
Application.run(new Warning());
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -