📄 descriptiondialog.java
字号:
/*
* DescriptionDialog.java
*
* Created on April 29, 2007, 4:24 PM
*
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
*/
package termproject_dijkstra;
/**
*
* @author Peto
*/
import java.awt.*;
import java.awt.event.*;
public class DescriptionDialog extends Dialog implements ActionListener
{
Button bt1;
Panel panel;
public DescriptionDialog(Frame owner,boolean modal)
{
super(owner,modal);
this.setLayout(new FlowLayout(FlowLayout.LEADING));
this.setSize(320,240);
this.setTitle("Dijkstra algorithm");
this.setResizable(false);
this.addWindowListener(new ClosingClass(this));
this.add(new Label("Author: Peter Kristof 6.2.2007"));
this.add(new Label("e-mail: peter.kristof@gmail.com "));
this.add(new Label("Description: "));
this.add(new Label(" Green sphere - node"));
this.add(new Label(" Red Sphere - edge orientation"));
this.add(new Label(" Under Node - Node's name [distance]"));
panel = new Panel();
panel.setLayout(new FlowLayout(FlowLayout.CENTER));
panel.add(new Label(" "));
bt1 = new Button("OK");
panel.add(bt1);
bt1.addActionListener(this);
this.add(panel);
this.setVisible(true);
}
class ClosingClass extends WindowAdapter
{
DescriptionDialog m_Dialog;
ClosingClass(DescriptionDialog dialog)
{
m_Dialog = dialog;
}
public void windowClosing(WindowEvent e)
{
m_Dialog.dispose();
}
}
public void actionPerformed(ActionEvent e)
{
this.dispose();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -