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

📄 helpdialog.java

📁 图论中关于简单无向图的深度
💻 JAVA
字号:
/** * <p>Title: </p> * <p>Description: </p> * <p>Copyright: Copyright (c) 2005</p> * <p>Company: </p> * @author not attributable * @version 1.0 */import java.awt.*;import java.awt.event.*;public class HelpDialog extends JavaBookDialog implements ActionListener{  //------------------------------------------------------------------------------//   Data Members//------------------------------------------------------------------------------    private Label l0,l1,l2,l3,l01,l02,l11,l21,l22,l23,l24,l25,l31,l4,l41,l5;    private Button button;//------------------------------------------------------------------------------//   Constructors//------------------------------------------------------------------------------    public HelpDialog(Frame owner)    {        super(owner);        setTitle("如何使用...");        setLayout(null);        setResizable(false);        setBackground(Color.lightGray);        l0=new  Label("0  本程序可以显示图搜索算法的广度优先搜索BFS");        l01=new Label("   和深度优先搜索DFS");        l1=new  Label("1  单击“画点“按钮或选择菜单“画图”上的“画");        l11=new Label("   点”后,可以在画图区域单击鼠标左键画点。" );        l2=new  Label("2  画完点后,单击“画边“按钮或选择菜单“画图”");        l21=new Label("   上的“画边”,然后单击边的第一个顶点,然后单");        l22=new Label("   击第二个顶点,可以画一条边。例如要画点“1”");        l23=new Label("   和“2”之间的一条边,先单击点“1”,然后再单");        l24=new Label("   击点“2”,之后会弹出要求输入边的权值的窗口,");        l25=new Label("   输入权值后这条边就加进图中了。");        l3=new  Label("3  图画完后,可以选择‘算法’菜单中的各个算法,");        l31=new Label("   进行算法的演示。");        l4=new  Label("4  单击“清除”按钮或选择菜单“画图”上的“清除”");        l41=new Label("   可以清除上次结果,重新画图。");        l5=new  Label("5  选择菜单画图上的生成随机图,可以生成一个随机的图");        button=new Button(" 确定 ");        add(l0);add(l01);        add(l1);add(l11);        add(l2);add(l21);add(l22);add(l23);add(l24);add(l25);        add(l3);add(l31);        add(l4);add(l41);        add(l5);        add(button);        button.addActionListener(this);    }//------------------------------------------------------------------------------//   Public Methods://      void    actionPerformed ( ActionEvent )//------------------------------------------------------------------------------    public void actionPerformed(ActionEvent event)    {        setVisible(false);    }//------------------------------------------------------------------------------//   Protected Methods://       void  adjustSize (   )//------------------------------------------------------------------------------    protected void adjustSize()    {        addNotify();        Insets inset=getInsets();        setSize(inset.left+inset.right+315,inset.top+inset.bottom+350);        l0.setBounds(inset.left+15,inset.top,400,20);        l01.setBounds(inset.left+15,inset.top+20,400,20);        l02.setBounds(inset.left+15,inset.top+40,400,20);        l1.setBounds(inset.left+15,inset.top+60,400,20);        l11.setBounds(inset.left+15,inset.top+80,400,20);        l2.setBounds(inset.left+15,inset.top+100,400,20);        l21.setBounds(inset.left+15,inset.top+120,400,20);        l22.setBounds(inset.left+15,inset.top+140,400,20);        l23.setBounds(inset.left+15,inset.top+160,400,20);        l24.setBounds(inset.left+15,inset.top+180,400,20);        l25.setBounds(inset.left+15,inset.top+200,400,20);        l3.setBounds(inset.left+15,inset.top+220,400,20);        l31.setBounds(inset.left+15,inset.top+240,400,20);        l4.setBounds(inset.left+15,inset.top+260,400,20);        l41.setBounds(inset.left+15,inset.top+280,400,20);                  l5.setBounds(inset.left+15,inset.top+300,400,20);        // button.setBounds(inset.left+100,inset.top+155,67,22);        button.setBounds(inset.left+115,inset.top+320,67,22);    }}

⌨️ 快捷键说明

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