📄 aboutdia.java
字号:
package util4;import javax.swing.*;import java.awt.*;public class AboutDia extends JDialog { JPanel jPanel1 = new JPanel(); GridBagLayout gridBagLayout1 = new GridBagLayout(); JLabel jLabel1 = new JLabel(); JLabel jLabel2 = new JLabel(); JLabel jLabel3 = new JLabel(); JLabel jLabel4 = new JLabel(); JLabel jLabel5 = new JLabel(); JLabel jLabel6 = new JLabel(); JLabel jLabel7 = new JLabel(); JLabel jLabel8 = new JLabel(); JLabel jLabel9 = new JLabel(); JLabel jLabel10 = new JLabel(); public AboutDia(Frame frame,String title,boolean modal) { super(frame,title,modal); try { jbInit(); } catch(Exception e) { e.printStackTrace(); } } private void jbInit() throws Exception { jPanel1.setLayout(gridBagLayout1); jLabel1.setFont(new java.awt.Font("Serif", 1, 19)); jLabel1.setForeground(new Color(85, 144, 151)); jLabel1.setText("Simple XML Editor"); jLabel2.setFont(new java.awt.Font("Dialog", 1, 13)); jLabel2.setForeground(new Color(0, 0, 164)); jLabel2.setText("2.4版"); jLabel3.setText(" "); jLabel4.setFont(new java.awt.Font("Monospaced", 0, 13)); jLabel4.setForeground(SystemColor.windowBorder); jLabel4.setText("Developed by : 陈亮"); jLabel5.setFont(new java.awt.Font("Dialog", 1, 3)); jLabel5.setText(" "); jLabel6.setFont(new java.awt.Font("Monospaced", 0, 13)); jLabel6.setForeground(SystemColor.windowBorder); jLabel6.setText("E-mail me : mailcl@163.com"); jLabel7.setFont(new java.awt.Font("Dialog", 1, 3)); jLabel7.setText(" "); jLabel8.setFont(new java.awt.Font("Monospaced", 0, 13)); jLabel8.setForeground(SystemColor.windowBorder); jLabel8.setText("Release date : 2002/11/21"); jLabel9.setText(" "); jLabel10.setFont(new java.awt.Font("Dialog", 1, 13)); jLabel10.setForeground(new Color(0, 0, 164)); jLabel10.setText("请别向我发垃圾邮件"); this.getContentPane().add(jPanel1, BorderLayout.CENTER); jPanel1.add(jLabel1, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0 ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); jPanel1.add(jLabel2, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0 ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); jPanel1.add(jLabel3, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0 ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); jPanel1.add(jLabel4, new GridBagConstraints(0, 3, 1, 1, 0.0, 0.0 ,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0)); jPanel1.add(jLabel5, new GridBagConstraints(0, 4, 1, 1, 0.0, 0.0 ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); jPanel1.add(jLabel6, new GridBagConstraints(0, 5, 1, 1, 0.0, 0.0 ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); jPanel1.add(jLabel7, new GridBagConstraints(0, 6, 1, 1, 0.0, 0.0 ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); jPanel1.add(jLabel8, new GridBagConstraints(0, 7, 1, 1, 0.0, 0.0 ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); jPanel1.add(jLabel9, new GridBagConstraints(0, 8, 1, 1, 0.0, 0.0 ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); jPanel1.add(jLabel10, new GridBagConstraints(0, 9, 1, 1, 0.0, 0.0 ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); setBounds(297,190,230,230); } public static void main(String[] arg){ Frame f=new Frame(); AboutDia ad=new AboutDia(f,null,false); ad.setVisible(true); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -