文件切割合并器 5 关于类

简介: 文件切割合并器 5 关于类


import java.awt.BorderLayout;

import java.awt.Color;

import java.awt.Dimension;

import java.awt.FlowLayout;

import java.awt.Font;

import java.awt.GridBagLayout;

import java.awt.Image;

import java.awt.Toolkit;

import java.awt.event.ActionEvent;

import java.awt.event.ActionListener;

import javax.swing.ImageIcon;

import javax.swing.JButton;

import javax.swing.JFrame;

import javax.swing.JLabel;

import javax.swing.JPanel;




public class About extends InitFrame

{

private static final long serialVersionUID = 1L;

public About(){

super("文件切割器—关于","file_split.png",310,180);

this.setResizable(false);

 

//设置字体

Font f1 = new Font("隶书",Font.PLAIN,20);

Font f2 = new Font("隶书",Font.PLAIN,20);

   this.setLayout(new BorderLayout());

JPanel northPanel = new JPanel();

JPanel southPanel = new JPanel();

this.add(northPanel,BorderLayout.CENTER);

this.add(southPanel,BorderLayout.SOUTH);

northPanel.setLayout(new GridBagLayout());

//设置标签

lb1 = new JLabel("作者:");

lb1.setForeground(FG1);

lb1.setFont(f1);

lb2 = new JLabel("刘汪洋");

lb2.setForeground(FG2);

lb2.setFont(f2);

lb3 = new JLabel("版本:");

lb3.setForeground(FG1);

lb3.setFont(f1);

lb4 = new JLabel("1.0.0");

lb4.setForeground(FG2);

lb4.setFont(f2);

//添加标签

northPanel.add(lb1,new GBC(0,0));

northPanel.add(lb2,new GBC(1,0));

northPanel.add(lb3,new GBC(0,1));

northPanel.add(lb4,new GBC(1,1));

//设置布局

southPanel.setLayout(new FlowLayout());

JButton ok = new JButton("确定",new ImageIcon("ok.png"));

southPanel.add(ok);

ok.addActionListener(new ActionListener(){

public void actionPerformed(ActionEvent e) {

About.this.setVisible(false);

About.this.dispose();

}

});

this.setDefaultCloseOperation (JFrame.DISPOSE_ON_CLOSE);//移除窗口的默认关闭操作

this.setVisible(true);


}

private JLabel lb1;

private JLabel lb2;

private JLabel lb3;

private JLabel lb4;

Color FG1 = Color.RED;//左侧标签的颜色

Color FG2 = Color.BLUE;//右侧标签的颜色

}

————————————————

版权声明:本文为CSDN博主「明明如月学长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。

原文链接:https://blog.csdn.net/w605283073/article/details/46572457

相关文章
51nod 1277 字符串中的最大值 (后缀数组求height[i])
51nod 1277 字符串中的最大值 (后缀数组求height[i])
66 0
|
算法 Go
【CCCC】L3-014 周游世界 (30分),,DFS搜索最短路,路径打印
【CCCC】L3-014 周游世界 (30分),,DFS搜索最短路,路径打印
170 0
|
机器学习/深度学习 vr&ar
CF1561D Up the Strip (整除分块 dp 因子)
CF1561D Up the Strip (整除分块 dp 因子)
117 0
CF1561D Up the Strip (整除分块 dp 因子)
【CCCC】L3-020 至多删三个字符 (30分),序列dp+去重
【CCCC】L3-020 至多删三个字符 (30分),序列dp+去重
183 0
|
人工智能
CF220B Little Elephant and Array(扫描线+树状数组)
CF220B Little Elephant and Array(扫描线+树状数组)
99 0
|
存储
文件切割合并器 2 切割类 Split
文件切割合并器 2 切割类 Split
141 0
|
移动开发 JavaScript Java
文件切割合并器 4 帮助类 Help
文件切割合并器 4 帮助类 Help
112 0
文件切割合并器 6  GBC 简化
文件切割合并器 6  GBC 简化
115 0
|
存储
文件切割合并器 3 合并类Merge
文件切割合并器 3 合并类Merge
141 0
|
编解码 安全 Java
文件切割合并器  下载地址 及 帮助
文件切割合并器  下载地址 及 帮助
110 0