样式修改

This commit is contained in:
cwchen 2025-03-14 13:53:38 +08:00
parent 56258a6ec0
commit 4ed7a06bcd
1 changed files with 10 additions and 10 deletions

View File

@ -35,7 +35,7 @@ public class OCRSwingArea extends JFrame {
this.setResizable(false);
// this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
this.setBounds(0, 0, 850, 565);
this.setBounds(0, 0, 1000, 565);
setLocationRelativeTo(null);
getContentPane().setLayout(null);
getContentPane().setBackground(new Color(236, 236, 248));
@ -69,13 +69,13 @@ public class OCRSwingArea extends JFrame {
table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
TableColumn labelColumn = table.getColumn("文件");
labelColumn.setCellRenderer(new LabelRenderer());
labelColumn.setPreferredWidth(310);
labelColumn.setPreferredWidth(390);
TableColumn buttonColumn = table.getColumn("操作");
buttonColumn.setPreferredWidth(80);
buttonColumn.setCellRenderer(new ButtonRenderer());
buttonColumn.setCellEditor(new OCRTableCellEditorButton());
JScrollPane statusScrollPane1 = new JScrollPane(table, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
statusScrollPane1.setBounds(15, 60, 400, 350);
statusScrollPane1.setBounds(15, 60, 480, 350);
getContentPane().add(statusScrollPane1);
/**********************工资册源版文件导入:添加按钮监听事件*******************/
@ -122,24 +122,24 @@ public class OCRSwingArea extends JFrame {
JLabel label3 = new JLabel("工资册签字版导入:");
label3.setHorizontalAlignment(JLabel.LEFT);
label3.setFont(new Font("微软雅黑", Font.BOLD, 14));
label3.setBounds(440, 10, 160, 30);
label3.setBounds(500, 10, 160, 30);
label3.setVerticalAlignment(SwingConstants.CENTER); // 设置垂直对齐方式
getContentPane().add(label3);
JLabel label4 = new JLabel("PDF");
label4.setHorizontalAlignment(JLabel.LEFT);
label4.setFont(new Font("微软雅黑", Font.BOLD, 14));
label4.setBounds(480, 30, 100, 30);
label4.setBounds(530, 30, 100, 30);
label4.setVerticalAlignment(SwingConstants.CENTER); // 设置垂直对齐方式
getContentPane().add(label4);
// 添加文件按钮2
JButton selectFile2 = new JButton("添加");
selectFile2.setFont(new Font("微软雅黑", Font.PLAIN, 15));
selectFile2.setBounds(600, 20, 80, 30);
selectFile2.setBounds(650, 20, 80, 30);
getContentPane().add(selectFile2);
// 重置文件按钮2
JButton resetFile2 = new JButton("重置");
resetFile2.setFont(new Font("微软雅黑", Font.PLAIN, 15));
resetFile2.setBounds(700, 20, 80, 30);
resetFile2.setBounds(750, 20, 80, 30);
getContentPane().add(resetFile2);
// 文件表格2
FileTableModel fileTableModel2 = new FileTableModel();
@ -152,9 +152,9 @@ public class OCRSwingArea extends JFrame {
buttonColumn2.setCellEditor(new OCRTableCellEditorButton2());
TableColumn labelColumn2 = table2.getColumn("文件");
labelColumn2.setCellRenderer(new LabelRenderer());
labelColumn2.setPreferredWidth(310);
labelColumn2.setPreferredWidth(390);
JScrollPane statusScrollPane2 = new JScrollPane(table2, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
statusScrollPane2.setBounds(420, 60, 400, 350);
statusScrollPane2.setBounds(500, 60, 480, 350);
getContentPane().add(statusScrollPane2);
/**********************工资册签字版导入:添加按钮监听事件*******************/
selectFile2.addActionListener(new ActionListener() {
@ -229,7 +229,7 @@ public class OCRSwingArea extends JFrame {
/**********************开始核对*******************/
JButton startCheckBtn = new JButton("开 始 核 对");
startCheckBtn.setFont(new Font("微软雅黑", Font.BOLD, 18));
startCheckBtn.setBounds(450, 450, 300, 40);
startCheckBtn.setBounds(500, 450, 400, 40);
getContentPane().add(startCheckBtn);
startCheckBtn.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {