资源简介
纯原创,有相关代码解释,有界面UI ArrayList 做存储。改一下可以当final project

代码片段和文件信息
import javax.swing.*;
import javax.swing.border.Border;
import javax.swing.border.EtchedBorder;
import javax.tools.Tool;
import java.awt.*;
import java.awt.event.*;
import java.util.ArrayList;
public class MainUI implements ActionListener
{
Jframe lgframe;
Jframe myframe;
JTextField fname;
JTextField lname;
JTextField etime;
JTextField uname;//login window
JPasswordField psword;// login window
JRadioButton emp_choice1;
JRadioButton emp_choice2;
JTextArea ta;
ArrayList full_time_emp = new ArrayList ();
ArrayList contract_emp = new ArrayList ();
ArrayList full_time=new ArrayList ();
ArrayList con_time=new ArrayList ();
public static void main(String[] args) throws Exception
{
MainUI finalproject=new MainUI();
//finalproject.salarysystem();
finalproject.login();
}
public void salarysystem()
{
myframe=new Jframe(“Salary System“);
System.out.println(Jframe.EXIT_ON_CLOSE);//exit_on_close是个int值
myframe.setDefaultCloseOperation(Jframe.EXIT_ON_CLOSE);
myframe.setLayout(new FlowLayout());
myframe.setSize(820 610);
myframe.setResizable(false);
Image icon = Toolkit.getDefaultToolkit().getImage(“E:\\eclipse\\workspace\\Final Project\\src\\logo.png“);
myframe.setIconImage(icon);
JPanel left_panel=new JPanel();// 左边主面板
left_panel.setLayout(new GridLayout(31));
//------------------主窗体-----------
JPanel button_panel=new JPanel();
JButton b1=new JButton(“UPLOAD DATA“);// 第一个, 按键面板
b1.addActionListener(this); //设置监听
JButton b2=new JButton(“Print“);
b2.addActionListener(this);
JButton bexit=new JButton(“EXIT“);
bexit.addActionListener(this);
button_panel.add(b1);
button_panel.add(b2);
button_panel.add(bexit);
//第二个 panel 放 输入的textfield
JPanel showing_panel=new JPanel(); // 第二个,输入数据面板
LayoutManager lm = new GridLayout(32);
showing_panel.setLayout(lm);
JLabel first_name=new JLabel(“First Name :“);
JLabel last_name=new JLabel(“Last Name :“);
JLabel time=new JLabel(“Months/Hours :“);
fname = new JTextField();
fname.setSize(5 5);
lname = new JTextField();
lname.setSize(55);
etime = new JTextField();
etime.setSize(55);
showing_panel.add(first_name);
showing_panel.add(fname);
showing_panel.add(last_name);
showing_panel.add(lname);
showing_panel.add(time);
showing_panel.add(etime);
// 3panel 放 TextArea
JPanel tarea=new JPanel(); // 第三个,JTextArea 显示数据面板
tarea.setBorder(new EtchedBorder(EtchedBorder.LOWERED));
ta = new JTextArea(3040);
ta.setText(“Notice that:“+“\n“+“the Salary of Full-time employee is $5000/ month“+“\n“+“the Salary of contract is $14/ hour“+“\n“);
ta.setBackground(Color.PINK);
ta.setWrapstyleWord(true);
ta.setEditable(false);
JScrollPane jsp = new JScrollPa
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1233 2017-12-05 13:49 logo.png
文件 7157 2017-12-06 23:02 MainUI.java
----------- --------- ---------- ----- ----
8390 2
- 上一篇:数字信号处理中的正交变换
- 下一篇:进程同步模拟设计--吃水果问题
相关资源
- SpringBoot+H2+mybatis-plus59130
- 登录注册界面.zip48872
- 数字华容道
- SSM+Shiro+redis实现单点登陆
- jstl-api-1.2和jstl-impl-1.2
- 基于MVC模式的会员管理系统
- 国内一家大型软件公司内部的正规软
- 仿windows记事本
- GUI银行管理系统
- 超市收银系统eclipse access大学课程设计
- 模拟ATM柜员机系统--连接数据库
- A*算法的2D演示(带源码)
- 代码审查表和代码审查实例
- 仿126 网易 163 邮箱 界面
- Tomcat6.x
- 简单的行编辑器
- 扫雷(MVC架构)
- 302 Found
- window ping命令加时间并记录日志
- springboot+rabbitmq项目demo(亲测可正常运
- jxbrowser 所有版本通用的破解包
- 2017年-传智播客-张志君老师-SpringBoo
- Blob.js+Export2Excel.js
- 机会路由源代码+仿真工具(SCORP)
- POI中文帮助文档附带api手册.zip
- 2018双十一阿里供应链服务平台讲座
- 原银在线信贷平台概要设计说明书v
- office_word_api 开发文档
- sun.misc.Unsafe源码
- netty的视频90集
评论
共有 条评论