⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 errorwindow.java

📁 一个由c转成java的3D robot 仿真平台
💻 JAVA
字号:
/************************************************************************//* File: ~/sopra/RoboPackII/ErrorWindow.java                            *//* This file consists of the "ErrorWIndow" class which shows an error   *//* text in a seperate window.                                           *//************************************************************************/package RoboPackII;import java.awt.*;import java.io.*;import java.applet.Applet;class ErrorWindow extends Frame{       	/* This class needs as argument an error text and shows it in */	/* a seperate window.					      */		private Button quitButton = new Button("Quit");	private Label textLabel = null;	private RoboProto myRobot;	ErrorWindow(String errorText, RoboProto rob)	{ 	   super("Error:");	   myRobot = rob;	   hide();	   move(100, 200);	   resize(400, 200);	   	   setLayout(new BorderLayout());	   textLabel = new Label(errorText);	   add("Center", textLabel);	   Panel quitPanel = new Panel();	   quitPanel.setLayout(new FlowLayout());// is necessary for the quit	   quitPanel.add(quitButton);	// button to appear in "normal" size	   add("South", quitPanel);	   pack();	   show();	   myRobot.menuDisable();	}	public boolean action(Event e, Object o)	{  	   if (e.target == quitButton)	      {		this.hide(); 		myRobot.menuEnable();		myRobot.crashIsActive = false;		this.dispose();	 	return true;	      }	    // sonst:	   return super.action(e, o);	}}

⌨️ 快捷键说明

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