📄 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();
Label label3 = new Label();
Label label4 = new Label();
Button button1 = new Button();
private void initForm()
{
label1.setBackColor(Color.RED);
label1.setFont(new Font("宋体", 26.0f, FontSize.POINTS, FontWeight.NORMAL, false, false, false, CharacterSet.DEFAULT, 0));
label1.setForeColor(Color.YELLOW);
label1.setSize(new Point(424, 40));
label1.setTabIndex(0);
label1.setTabStop(false);
label1.setText("注意");
label1.setBorderStyle(BorderStyle.FIXED_3D);
label2.setFont(new Font("宋体", 11.0f, FontSize.POINTS, FontWeight.NORMAL, false, false, false, CharacterSet.DEFAULT, 0));
label2.setLocation(new Point(8, 48));
label2.setSize(new Point(320, 16));
label2.setTabIndex(1);
label2.setTabStop(false);
label2.setText("请确定输入的“点坐标序列”遵守以下语法规则:");
label3.setFont(new Font("宋体", 11.0f, FontSize.POINTS, FontWeight.NORMAL, false, false, false, CharacterSet.DEFAULT, 0));
label3.setLocation(new Point(16, 72));
label3.setSize(new Point(360, 64));
label3.setTabIndex(2);
label3.setTabStop(false);
label3.setText("一、每个点分前后两部分。 第一部分为此点的文本标记。 第二部分为此点的坐标。 例如:上海(7.27,9.33) 连云港(0.17,200)");
label4.setFont(new Font("宋体", 11.0f, FontSize.POINTS, FontWeight.NORMAL, false, false, false, CharacterSet.DEFAULT, 0));
label4.setLocation(new Point(16, 144));
label4.setSize(new Point(368, 32));
label4.setTabIndex(3);
label4.setTabStop(false);
label4.setText("二、若有多点,则应分行输入,各行之间不应有空行或其 它字符串。");
button1.setLocation(new Point(304, 176));
button1.setSize(new Point(80, 24));
button1.setTabIndex(4);
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_DIALOG);
this.setClientSize(new Point(420, 226));
this.setMaximizeBox(false);
this.setMinimizeBox(false);
this.setStartPosition(FormStartPosition.CENTER_SCREEN);
this.setNewControls(new Control[] {
button1,
label4,
label3,
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 + -