📄 helpdialog.java
字号:
import javax.swing.*;
import java.awt.event.*;
import java.awt.*;
import java.io.*;
class HelpDialog extends JDialog implements ActionListener
{
private JLabel l1,l2,l3,l4;
private URLLabel l5,l6;
private JButton ok,help,special,check;
private ImagePanel icon;
public HelpDialog(EnterQQ qq)
{
super(qq,"关于QQ自动登录器",true);
icon=new ImagePanel(EnterQQ.ICON);
l1=new JLabel("QQ自动登录器v1.6.1.324版");
l2=new JLabel("免费的、绿色的、安全的");
l3=new JLabel("最后开发时间:2007年11月20日");
l4=new JLabel("Shmily 出品");
l5=new URLLabel("当前版本:Shmily制作版","http://www.steven-studio.com");
l6=new URLLabel("进入Java论坛","http://www.yuanma.org/");
ok=new JButton("确定");
special=new JButton("版本特征");
help=new JButton("帮助");
check=new JButton("检查更新");
ok.addActionListener(this);
help.addActionListener(this);
special.addActionListener(this);
check.addActionListener(this);
JPanel labelPanel=new JPanel();
labelPanel.setLayout(new GridLayout(6,1,0,8));
labelPanel.add(l1);
labelPanel.add(l2);
labelPanel.add(l3);
labelPanel.add(l4);
labelPanel.add(l5);
labelPanel.add(l6);
JPanel buttonPanel=new JPanel();
buttonPanel.setLayout(new GridLayout(4,1,0,10));
buttonPanel.add(ok);
buttonPanel.add(special);
buttonPanel.add(help);
buttonPanel.add(check);
setLayout(null);
icon.setBounds(15,15,48,48);
labelPanel.setBounds(70,15,170,140);
buttonPanel.setBounds(240,20,90,120);
add(icon);
add(labelPanel);
add(buttonPanel);
Point loc=qq.getLocation();
setBounds((int)loc.getX()+10,(int)loc.getY()+10,350,200);
setResizable(false);
setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
setVisible(true);
}
public void actionPerformed(ActionEvent e)
{
Object o=e.getSource();
if(o==ok)
{
dispose();
}
else if(o==special)
{
new SpecialDialog(this);
}
else if(o==help)
{
File file=new File("HELP.chm");
if(!file.exists())
{
JOptionPane.showMessageDialog(null," 帮助文档不存在!","警告信息",JOptionPane.INFORMATION_MESSAGE,EnterQQ.WARNING);
return;
}
try
{
Runtime.getRuntime().exec("cmd /c \""+file.getAbsolutePath()+"\"");
}
catch(Exception ee)
{}
}
else if(o==check)
{
try
{
Runtime.getRuntime().exec("explorer http://www.steven-studio.com");
}
catch(Exception ee)
{}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -