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

📄 guidialog.java

📁 JAVA 数学程序库 提供常规的数值计算程序包
💻 JAVA
字号:
package jmathlib.ui.awt;

import java.awt.*;
import java.awt.event.*;

/**Simple dialog extension that creates a new non-modal and centered dialog.*/
public class GUIDialog extends Dialog implements WindowListener
{
	public GUIDialog(Frame _owner, String _title)
	{
		super(_owner, _title, true);
		setLayout(null);
		setVisible(false);
		this.setBackground(_owner.getBackground());
		this.addWindowListener(this);
	}

	public synchronized void show()
	{
		// Get the size of the screen
	    Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
		// position the frame in the centre of the screen
		setLocation((d.width-getSize().width) / 2, (d.height-getSize().height) / 2);
		super.show();
	}

	public void windowActivated(WindowEvent e)
	{
	}

	public void windowClosed(WindowEvent e)
	{
	}

	public void windowClosing(WindowEvent e)
	{
		dispose();
	}

	public void windowDeactivated(WindowEvent e)
	{
	}

	public void windowDeiconified(WindowEvent e)
	{
	}

	public void windowIconified(WindowEvent e)
	{
	}

	public void windowOpened(WindowEvent e)
	{
	}
}

⌨️ 快捷键说明

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