﻿{"id":331,"date":"2025-10-07T01:21:07","date_gmt":"2025-10-07T01:21:07","guid":{"rendered":"http:\/\/noting.online\/?p=331"},"modified":"2026-06-24T01:06:15","modified_gmt":"2026-06-23T17:06:15","slug":"%e5%9f%ba%e4%ba%8ejava-swt%e7%9a%84%e5%9b%be%e4%b9%a6%e7%ae%a1%e7%90%86%e7%b3%bb%e7%bb%9f%e8%ae%be%e8%ae%a1","status":"publish","type":"post","link":"https:\/\/noting.online\/?p=331","title":{"rendered":"\u57fa\u4e8ejava-SWT\u7684\u56fe\u4e66\u7ba1\u7406\u7cfb\u7edf\u8bbe\u8ba1"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u5de5\u5177\uff1a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">IDE\uff1aEclipse IDE for Java Developers-2023-09<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6570\u636e\u5e93\uff1aMySQL 8<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u529f\u80fd\u8bf4\u660e<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u7528java SWT\u505a\u4e00\u4e2a\u56fe\u4e66\u7ba1\u7406\u7cfb\u7edf\uff0c\u8981\u6c42\u5b9e\u73b0\u5982\u4e0b\u529f\u80fd\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u7528\u6237\u4ece\u767b\u5f55\u7a97\u53e3\u767b\u5f55\u3002\u7528\u6237\u8eab\u4efd\u67093\u79cd\uff1a\u9ad8\u7ea7\u7ba1\u7406\u5458\uff0c\u666e\u901a\u7ba1\u7406\u5458\uff0c\u666e\u901a\u7528\u6237\u3002\u6743\u9650\u5982\u4e0b\uff1a<\/li>\n<\/ul>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u9ad8\u7ea7\u7ba1\u7406\u5458\u5177\u6709\u6240\u6709\u6743\u9650\uff0c\u5305\u62ec\u589e\u3001\u5220\u3001\u6539\u3001\u67e5\u4e66\u7c4d\u548c\u7528\u6237\uff0c\u501f\u4e66\u548c\u8fd8\u4e66\uff0c\u8bbe\u7f6e\u501f\u9605\u6570\u91cf\u9650\u5236\uff0c\u67e5\u770b\u6240\u6709\u4eba\u7684\u501f\u9605\u8bb0\u5f55\uff1b<\/li>\n\n\n\n<li>\u666e\u901a\u7ba1\u7406\u5458\u53ea\u80fd\u589e\u3001\u5220\u3001\u6539\u3001\u67e5\u4e66\u7c4d\uff0c\u501f\u4e66\uff0c\u8fd8\u4e66\uff0c\u67e5\u770b\u6240\u6709\u4eba\u7684\u501f\u9605\u8bb0\u5f55\uff1b<\/li>\n\n\n\n<li>\u666e\u901a\u7528\u6237\u53ea\u80fd\u501f\u4e66\u548c\u8fd8\u4e66\uff0c\u67e5\u770b\u81ea\u5df1\u7684\u501f\u9605\u8bb0\u5f55\u3002<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1389\" height=\"539\" src=\"http:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image-12.png\" alt=\"\" class=\"wp-image-348\" srcset=\"https:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image-12.png 1389w, https:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image-12-300x116.png 300w, https:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image-12-1024x397.png 1024w, https:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image-12-768x298.png 768w\" sizes=\"auto, (max-width: 1389px) 100vw, 1389px\" \/><\/figure>\n\n\n\n<p class=\"img-center wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u6240\u6709\u7528\u6237\u548c\u4e66\u7c4d\u5747\u6709\u6b63\u5e38\u548c\u51bb\u7ed3\u4e24\u79cd\u72b6\u6001\u3002<\/li>\n\n\n\n<li>\u9ad8\u7ea7\u7ba1\u7406\u5458\u53ef\u4ee5\u8bbe\u7f6e\u6240\u6709\u7528\u6237\u548c\u4e66\u7c4d\u7684\u72b6\u6001\uff0c\u666e\u901a\u7ba1\u7406\u5458\u53ea\u53ef\u4ee5\u8bbe\u7f6e\u4e66\u7c4d\u7684\u72b6\u6001\u3002<\/li>\n\n\n\n<li>\u88ab\u51bb\u7ed3\u7684\u7528\u6237\u53ea\u80fd\u8fdb\u884c\u8fd8\u4e66\u548c\u67e5\u8be2\u64cd\u4f5c\uff0c\u88ab\u51bb\u7ed3\u7684\u4e66\u7c4d\u53ea\u80fd\u88ab\u8fd8\u800c\u4e0d\u80fd\u88ab\u501f\u3002<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u6570\u636e\u5e93\u8bbe\u8ba1<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f7f\u7528MySQL\u5efa\u7acbLibrary\u6570\u636e\u5e93\uff0c\u521b\u5efa5\u4e2a\u8868\uff1a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u8868books\u5b58\u50a8\u6240\u6709\u4e66\u7c4d\u7684\u4fe1\u606f\uff0c\u5305\u62ecISBN\uff08\u552f\u4e00\u6807\u8bc6\uff09\u3001\u4e66\u540d\u3001\u4f5c\u8005\u3001\u4e66\u7c4d\u7c7b\u578b\uff08\u6587\u5b66\u3001\u79d1\u5b66\u7b49\uff09\u3001\u51fa\u7248\u793e\u3001\u51fa\u7248\u65e5\u671f\u3001\u9986\u85cf\u603b\u6570\u3001\u501f\u51fa\u6570\u91cf\u3001\u672a\u501f\u51fa\u6570\u91cf\u3001\u4e66\u7c4d\u72b6\u6001\uff08\u6b63\u5e38\u6216\u51bb\u7ed3\uff09\u548c\u6dfb\u52a0\u65e5\u671f\uff1b<\/li>\n\n\n\n<li>\u8868users\u5b58\u50a8\u6240\u6709\u7528\u6237\uff08\u5305\u62ec\u9ad8\u7ea7\u7ba1\u7406\u5458\uff0c\u666e\u901a\u7ba1\u7406\u5458\u548c\u666e\u901a\u7528\u6237\uff09\u7684\u4fe1\u606f\uff0c\u5305\u62ec\u7528\u6237\u540d\u3001\u59d3\u540d\u3001\u767b\u5f55\u5bc6\u7801\u3001\u8eab\u4efd\u7c7b\u578b\uff08\u4e0a\u8ff0\u4e09\u79cd\u8eab\u4efd\u4e4b\u4e00\uff09\u3001\u7528\u6237\u72b6\u6001\uff08\u6b63\u5e38\u6216\u51bb\u7ed3\uff09\u548c\u6dfb\u52a0\u65e5\u671f\uff1b<\/li>\n\n\n\n<li>\u8868records\u5b58\u50a8\u7528\u6237\u7684\u501f\u8fd8\u8bb0\u5f55\u4fe1\u606f\uff0c\u5305\u62ec\u64cd\u4f5c\u65f6\u95f4\u3001\u7528\u6237\u540d\u3001\u59d3\u540d\u3001ISBN\u3001\u4e66\u540d\u3001\u64cd\u4f5c\u7c7b\u578b\uff08\u501f\u9605\u6216\u5f52\u8fd8\uff09\u548c\u64cd\u4f5c\u6570\u91cf\uff1b<\/li>\n\n\n\n<li>\u8868states\u5b58\u50a8\u7528\u6237\u501f\u8fd8\u4e66\u7c4d\u7684\u72b6\u6001\u4fe1\u606f\uff0c\u5305\u62ec\u7528\u6237\u540d\u3001\u59d3\u540d\u3001ISBN\u3001\u4e66\u540d\u3001\u5171\u501f\u8fc7\u8be5\u672c\u4e66\u7684\u6570\u91cf\u3001\u5df2\u8fd8\u6570\u91cf\u3001\u672a\u8fd8\u6570\u91cf\u3002\u8fd9\u91cc\u7528\u6237\u540d\u548cISBN\u5171\u540c\u786e\u5b9a\u4e00\u6761\u8bb0\u5f55\uff0c\u67d0\u7528\u6237\u591a\u6b21\u501f\u8fd8\u8be5\u672c\u4e66\u4f1a\u4ee5\u7d2f\u52a0\u7684\u8ba1\u7b97\u65b9\u6cd5\u6539\u53d8\u8be5\u6761\u8bb0\u5f55\uff1b<\/li>\n\n\n\n<li>\u8868settings\u53ea\u5b58\u50a8\u4e24\u4e2a\u6570\uff0c\u6700\u5927\u5141\u8bb8\u501f\u9605\u603b\u6570\u548c\u5355\u672c\u6700\u5927\u5141\u8bb8\u501f\u9605\u6570\u91cf\uff0c\u53ea\u80fd\u7531\u9ad8\u7ea7\u7ba1\u7406\u5458\u8bbe\u7f6e\u3002<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u521b\u5efa\u6570\u636e\u5e93\uff1a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">create database Library;<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5404\u4e2a\u8868\u7684\u5b57\u6bb5\u4fe1\u606f\u8bbe\u7f6e\u5982\u4e0b\u6240\u8ff0\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">books\u8868<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b57\u6bb5\u8bbe\u7f6e\uff1a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"611\" height=\"218\" src=\"http:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image-2.png\" alt=\"\" class=\"wp-image-337\" srcset=\"https:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image-2.png 611w, https:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image-2-300x107.png 300w\" sizes=\"auto, (max-width: 611px) 100vw, 611px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5efa\u8868books\u8bed\u53e5\uff1a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">create table books(bookId int not null auto_increment,isbn varchar(20) not null,bookName varchar(20) not null,author varchar(20),bookType varchar(10),publisher varchar(20),publishDate date, totalCount int not null,borrowedCount int not null default 0,unborrowedCount int,bookState varchar(2) default '\u6b63\u5e38',primary key (bookId))engine=innodb default charset=utf8;<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e0b\u9762\u662f\u5206\u884c\u5c55\u793a\u7684books\u7684\u51e0\u6761\u8bb0\u5f55\uff1a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"681\" height=\"123\" src=\"http:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image-4.png\" alt=\"\" class=\"wp-image-340\" srcset=\"https:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image-4.png 681w, https:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image-4-300x54.png 300w\" sizes=\"auto, (max-width: 681px) 100vw, 681px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"685\" height=\"90\" src=\"http:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image-1.png\" alt=\"\" class=\"wp-image-336\" srcset=\"https:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image-1.png 685w, https:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image-1-300x39.png 300w\" sizes=\"auto, (max-width: 685px) 100vw, 685px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">users\u8868<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b57\u6bb5\u8bbe\u7f6e:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"572\" height=\"202\" src=\"http:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image.png\" alt=\"\" class=\"wp-image-335\" srcset=\"https:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image.png 572w, https:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image-300x106.png 300w\" sizes=\"auto, (max-width: 572px) 100vw, 572px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5efa\u8868users\u8bed\u53e5\uff1a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">create table users(userId int(5) not null auto_increment,userAccount char(8) not null,userName varchar(20) not null,userPassword varchar(20) not null,userRole varchar(5) not null default '\u666e\u901a\u7528\u6237',userState char(2) not null default '\u6b63\u5e38',primary key (userId))engine=innodb default charset=utf8;<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u7531\u4e8e\u9700\u8981\u767b\u5f55\u4f7f\u7528\uff0c\u9700\u8981\u5148\u9884\u7f6e\u4e00\u4e2a\u9ad8\u7ea7\u7ba1\u7406\u5458\u89d2\u8272\uff1a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">insert into users(userAccount,userName,userPassword,userRole) values('00000000','\u5f20\u4e09','password','\u9ad8\u7ea7\u7ba1\u7406\u5458');<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd8\u53ef\u4ee5\u624b\u52a8\u6dfb\u52a0\u5176\u4ed6\u7528\u6237\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">users\u7684\u51e0\u6761\u8bb0\u5f55\uff1a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"687\" height=\"131\" src=\"http:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image-3.png\" alt=\"\" class=\"wp-image-339\" srcset=\"https:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image-3.png 687w, https:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image-3-300x57.png 300w\" sizes=\"auto, (max-width: 687px) 100vw, 687px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">records\u8868<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b57\u6bb5\u8bbe\u7f6e:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"611\" height=\"218\" src=\"http:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image-2.png\" alt=\"\" class=\"wp-image-338\" srcset=\"https:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image-2.png 611w, https:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image-2-300x107.png 300w\" sizes=\"auto, (max-width: 611px) 100vw, 611px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5efa\u8868records\u8bed\u53e5\uff1a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">create table records(operationId int not null auto_increment,operationDatetime datetime not null,userAccount char(8) not null,userName varchar(20),isbn varchar(20) not null,bookName varchar(20),operationType char(1) not null,operationCount int not null,primary key (operationId))engine=innodb default charset=utf8;<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">records\u7684\u51e0\u6761\u8bb0\u5f55\uff1a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"684\" height=\"70\" src=\"http:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image-5.png\" alt=\"\" class=\"wp-image-341\" srcset=\"https:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image-5.png 684w, https:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image-5-300x31.png 300w\" sizes=\"auto, (max-width: 684px) 100vw, 684px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">states\u8868<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b57\u6bb5\u8bbe\u7f6e:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"593\" height=\"219\" src=\"http:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image-6.png\" alt=\"\" class=\"wp-image-342\" srcset=\"https:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image-6.png 593w, https:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image-6-300x111.png 300w\" sizes=\"auto, (max-width: 593px) 100vw, 593px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5efa\u8868states\u8bed\u53e5\uff1a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">create table states(stateId int not null,userAccount char(8) not null,userName varchar(20),isbn varchar(20) not null,bookName varchar(20),borrowedCount int not null,returnedCount int not null,unReturnedCount int not null,primary key (stateId))engine=innodb default charset=utf8;<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">states\u7684\u51e0\u6761\u8bb0\u5f55\uff1a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"685\" height=\"85\" src=\"http:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image-7.png\" alt=\"\" class=\"wp-image-343\" srcset=\"https:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image-7.png 685w, https:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image-7-300x37.png 300w\" sizes=\"auto, (max-width: 685px) 100vw, 685px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">settings\u8868<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b57\u6bb5\u8bbe\u7f6e:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"554\" height=\"125\" src=\"http:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image-8.png\" alt=\"\" class=\"wp-image-344\" srcset=\"https:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image-8.png 554w, https:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image-8-300x68.png 300w\" sizes=\"auto, (max-width: 554px) 100vw, 554px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5efa\u8868settings\u8bed\u53e5\uff1a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">create table settings(maxAllowedTotalBorrowCount int not null,maxAllowedSingleBorrowCount int not null)engine=innodb default charset=utf8;<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u540c\u6837\uff0csettings\u7684\u8bb0\u5f55\u4e5f\u9700\u8981\u9884\u7f6e\uff1a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">insert into settings values(10,5);<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">settings\u5b58\u50a8\u7684\u8bb0\u5f55\uff1a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"479\" height=\"104\" src=\"http:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image-9.png\" alt=\"\" class=\"wp-image-345\" srcset=\"https:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image-9.png 479w, https:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image-9-300x65.png 300w\" sizes=\"auto, (max-width: 479px) 100vw, 479px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u7528\u6237\u9884\u7f6e<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u9700\u8981\u9884\u7f6e\u4e00\u4e2a\u6570\u636e\u5e93\u7528\u6237\u7528\u4e8e\u8fde\u63a5\u6570\u636e\u5e93\uff0c\u7528\u6237\u540d\u4e3ascott\uff0c\u5bc6\u7801\u4e3atiger\uff0c\u8d4b\u4e88\u6240\u6709\u6743\u9650\uff1a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">create user 'scott' identified by 'tiger';\ngrant all privileges on *.* to 'scott'@'%' with grant option;<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">UI\u8bbe\u8ba1<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u767b\u5f55\u7a97\u53e3<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"216\" height=\"128\" src=\"http:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image-10.png\" alt=\"\" class=\"wp-image-346\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6240\u6709\u7528\u6237\u5171\u7528\u4e00\u4e2a\u767b\u5f55\u7a97\u53e3\uff0c\u6839\u636e\u6240\u8f93\u5165\u7684\u7528\u6237\u540d\u662f\u5426\u5b58\u50a8\u5728users\u8868\u4e2d\u53ca\u5bc6\u7801\u662f\u5426\u6b63\u786e\u6765\u51b3\u5b9a\u662f\u5426\u5141\u8bb8\u767b\u5f55\u3002\u767b\u5f55\u65f6\u4eceusers\u8868\u83b7\u53d6\u7528\u6237\u7684\u8eab\u4efd\uff0c\u4e0d\u540c\u8eab\u4efd\u6709\u4e0d\u540c\u7684\u5c55\u793a\u9879\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u4e3b\u754c\u9762<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u9ad8\u7ea7\u7ba1\u7406\u5458\u754c\u9762\u5c55\u793a\u6240\u6709\u4e66\u7c4d\u3001\u6240\u6709\u7528\u6237\u3001\u6240\u6709\u501f\u9605\u72b6\u6001\u3001\u6211\u7684\u501f\u9605\u72b6\u6001\u56db\u4e2a\u8868\u683c\u754c\u9762\uff0c\u8fd9\u91cc\u901a\u8fc7SWT\u4e2d\u7684\u6269\u5c55\u680f\u5b9e\u73b0\u56db\u4e2a\u754c\u9762\u7684\u5207\u6362\u5c55\u793a\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6240\u6709\u4e66\u7c4d\u548c\u6240\u6709\u7528\u6237\u754c\u9762\u63d0\u4f9b\u589e\u5220\u6539\u67e5\u6309\u94ae\uff0c\u6240\u6709\u501f\u9605\u72b6\u6001\u548c\u6211\u7684\u501f\u9605\u72b6\u6001\u53ea\u63d0\u4f9b\u67e5\u627e\u6309\u94ae\uff0c\u5176\u8868\u683c\u5185\u5bb9\u7531\u7528\u6237\u7684\u64cd\u4f5c\u81ea\u52a8\u5b58\u5165\u6570\u636e\u5e93\uff0c\u4e0d\u80fd\u66f4\u6539\u3002\u501f\u9605\u8bb0\u5f55\u8be6\u60c5\u901a\u8fc7\u8868\u683c\u7684\u4e0a\u4e0b\u6587\u83dc\u5355\u5f39\u51fa\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u9ad8\u7ea7\u7ba1\u7406\u5458\u754c\u9762\u540c\u65f6\u5c55\u793a\u8bbe\u7f6e\u3001\u66f4\u65b0\u3001\u8fd4\u56de\u767b\u5f55\u754c\u9762\u3001\u9000\u51fa\u56db\u4e2a\u6309\u94ae\u3002\u8bbe\u7f6e\u6309\u94ae\u7528\u4e8e\u8bbe\u7f6e\u7528\u6237\u7684\u6700\u5927\u53ef\u501f\u9605\u603b\u6570\u548c\u6700\u5927\u5355\u672c\u53ef\u501f\u9605\u6570\u91cf\uff1b\u66f4\u65b0\u6309\u94ae\u7528\u4e8e\u5f53\u8fdb\u884c\u589e\u5220\u6539\u67e5\u64cd\u4f5c\u540e\u66f4\u65b0\u5c55\u793a\u7684\u4fe1\u606f\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"202\" height=\"128\" src=\"http:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image-11.png\" alt=\"\" class=\"wp-image-347\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"619\" height=\"588\" src=\"http:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image-19.png\" alt=\"\" class=\"wp-image-355\" srcset=\"https:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image-19.png 619w, https:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image-19-300x285.png 300w\" sizes=\"auto, (max-width: 619px) 100vw, 619px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"617\" height=\"383\" src=\"http:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image-15.png\" alt=\"\" class=\"wp-image-351\" srcset=\"https:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image-15.png 617w, https:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image-15-300x186.png 300w\" sizes=\"auto, (max-width: 617px) 100vw, 617px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u666e\u901a\u7ba1\u7406\u5458\u5c55\u793a\u6240\u6709\u4e66\u7c4d\u3001\u6240\u6709\u501f\u9605\u72b6\u6001\u548c\u6211\u7684\u501f\u9605\u72b6\u6001\u4e09\u9879\uff1a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"719\" height=\"248\" src=\"http:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image-17.png\" alt=\"\" class=\"wp-image-353\" srcset=\"https:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image-17.png 719w, https:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image-17-300x103.png 300w\" sizes=\"auto, (max-width: 719px) 100vw, 719px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u666e\u901a\u7528\u6237\u53ea\u5c55\u793a\u6240\u6709\u4e66\u7c4d\u548c\u6211\u7684\u501f\u9605\u72b6\u6001\u4e24\u9879\uff1a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"716\" height=\"221\" src=\"http:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image-16.png\" alt=\"\" class=\"wp-image-352\" srcset=\"https:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image-16.png 716w, https:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image-16-300x93.png 300w\" sizes=\"auto, (max-width: 716px) 100vw, 716px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u4e0a\u4e0b\u6587\u83dc\u5355<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp;\u56fe\u4e66\u501f\u8fd8\u529f\u80fd\u901a\u8fc7\u9009\u4e2d\u4e66\u7c4d\u8868\u683c\u884c\u65f6\u53f3\u952e\u5f39\u51fa\u7684\u4e0a\u4e0b\u6587\u83dc\u5355\u63d0\u4f9b\u3002\u56fe\u4e66\u548c\u767b\u5f55\u7528\u6237\u7684\u72b6\u6001\u4e0d\u540c\uff0c\u53f3\u952e\u83dc\u5355\u4e5f\u4e0d\u540c\u3002\u56fe\u4e66\u548c\u767b\u5f55\u7528\u6237\u6709\u4efb\u4e00\u4e2a\u51bb\u7ed3\u65f6\uff0c\u4e0d\u5f39\u51fa\u501f\u9605\u6309\u94ae\u3002\u56fe\u4e66\u672a\u88ab\u767b\u5f55\u7528\u6237\u501f\u9605\u65f6\uff0c\u4e0d\u5f39\u51fa\u5f52\u8fd8\u6309\u94ae\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"726\" height=\"435\" src=\"http:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image-20.png\" alt=\"\" class=\"wp-image-356\" srcset=\"https:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image-20.png 726w, https:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image-20-300x180.png 300w\" sizes=\"auto, (max-width: 726px) 100vw, 726px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u5bf9\u8bdd\u6846<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5f53\u70b9\u51fb\u6dfb\u52a0\u3001\u5220\u9664\u3001\u4fee\u6539\u3001\u501f\u9605\u548c\u5f52\u8fd8\u6309\u94ae\u65f6\uff0c\u5f39\u51fa\u76f8\u5e94\u7684\u64cd\u4f5c\u9762\u677f\uff1a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"652\" height=\"574\" src=\"http:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image-13.png\" alt=\"\" class=\"wp-image-349\" srcset=\"https:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image-13.png 652w, https:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image-13-300x264.png 300w\" sizes=\"auto, (max-width: 652px) 100vw, 652px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u67e5\u8be2\u754c\u9762<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp;\u70b9\u51fb\u67e5\u627e\u6309\u94ae\uff0c\u5f39\u51fa\u54cd\u5e94\u7684\u67e5\u8be2\u9762\u677f\uff0c\u5176\u4e2d\u53ef\u4ee5\u901a\u8fc7\u8bbe\u7f6e\u4e00\u4e9b\u6761\u4ef6\u7b5b\u9009\uff1a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"650\" height=\"572\" src=\"http:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image-14.png\" alt=\"\" class=\"wp-image-350\" srcset=\"https:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image-14.png 650w, https:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image-14-300x264.png 300w\" sizes=\"auto, (max-width: 650px) 100vw, 650px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u7c7b\u5b9e\u73b0&nbsp;<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8003\u8651\u5230\u4e0a\u8ff0\u754c\u9762\u6709\u5927\u91cf\u7684\u5171\u540c\u70b9\uff0c\u56e0\u6b64\u901a\u8fc7\u7c7b\u6765\u5b9e\u73b0\uff0c\u901a\u8fc7\u4f20\u5165\u4e0d\u540c\u7684\u6784\u9020\u53c2\u6570\u5373\u53ef\u5c55\u793a\u4e0d\u540c\u7684\u9762\u677f\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u91cc\u5efa\u7acbMainUI\u7c7b\uff0c\u4e0d\u540c\u8eab\u4efd\u7684\u7528\u6237\u767b\u5f55\u65f6\uff0c\u4f20\u5165\u7684\u6784\u9020\u53c2\u6570\u51b3\u5b9a\u4e86\u5c55\u793a\u54ea\u4e9b\u8868\u683c\u548c\u6309\u94ae\u9879\uff1b<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5efa\u7acbOperationComposition\u7c7b\uff0c\u7ee7\u627fComposition\u7c7b\uff0c\u7528\u4e8e\u5728\u6269\u5c55\u9879\u4e2d\u5305\u542b\u64cd\u4f5c\u6309\u94ae\u548c\u8868\u683c\uff1b<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5efa\u7acbExtendedTable\u7c7b\uff0c\u7ee7\u627fTable\u7c7b\uff0c\u6839\u636e\u4f20\u5165\u7684\u6784\u9020\u53c2\u6570\uff08\u5305\u62ec\u8981\u5c55\u793a\u7684\u6570\u636e\u7b49\uff09\u7ed8\u5236\u8868\u683c\uff0c\u7c7b\u4e2d\u8fd8\u4f1a\u6839\u636e\u767b\u5f55\u7528\u6237\u7684\u8eab\u4efd\u9009\u62e9\u5728\u8868\u683c\u4e0a\u5f39\u51fa\u54ea\u4e9b\u4e0a\u4e0b\u6587\u83dc\u5355\uff1b<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1097\" height=\"808\" src=\"http:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image-18.png\" alt=\"\" class=\"wp-image-354\" srcset=\"https:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image-18.png 1097w, https:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image-18-300x221.png 300w, https:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image-18-1024x754.png 1024w, https:\/\/noting.online\/wp-content\/uploads\/2025\/10\/image-18-768x566.png 768w\" sizes=\"auto, (max-width: 1097px) 100vw, 1097px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp;\u5efa\u7acbOperationPanel\u7c7b\uff0c\u7528\u4e8e\u70b9\u51fb\u589e\u3001\u5220\u3001\u6539\u548c\u501f\u8fd8\u6309\u94ae\u65f6\u5f39\u51fa\u9762\u677f\uff0c\u6784\u9020\u53c2\u6570\u5305\u62ec\u8981\u5c55\u793a\u7684\u8f93\u5165\u9879\u7b49\uff1b<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5efa\u7acbSearchUI\u7c7b\uff0c\u7528\u4e8e\u70b9\u51fb\u67e5\u627e\u6309\u94ae\u65f6\u5f39\u51fa\u67e5\u8be2\u9762\u677f\uff0c\u53ef\u4ee5\u8bbe\u7f6e\u4e00\u4e9b\u67e5\u8be2\u6761\u4ef6\u3002SearchUI\u7c7b\u4e2d\u6784\u9020\u4e86ExtendedTable\u5bf9\u8c61\u7528\u4e8e\u5c55\u793a\u67e5\u8be2\u5230\u7684\u8868\u683c\u6570\u636e\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5173\u952e\u90e8\u5206\u4ee3\u7801\uff1a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u767b\u5f55\u754c\u9762 LoginShell2<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">LoginShell2.java:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<pre class=\"language-sql wp-block-code\"><code class=\"language-sql\">import org.eclipse.swt.widgets.Display;\nimport org.eclipse.swt.widgets.Shell;\nimport org.eclipse.swt.widgets.Label;\nimport org.eclipse.swt.widgets.MessageBox;\n\/\/import java.beans.Statement;\nimport java.sql.Connection;\nimport java.sql.Driver;\nimport java.sql.DriverManager;\nimport java.sql.ResultSet;\nimport java.sql.SQLException;\nimport java.sql.Statement;\nimport org.eclipse.swt.SWT;\nimport org.eclipse.swt.widgets.Text;\n\/\/import org.eclipse.wb.swt.NormUserUI;\nimport org.eclipse.swt.widgets.Button;\nimport org.eclipse.swt.events.SelectionAdapter;\nimport org.eclipse.swt.events.SelectionEvent;\npublic class LoginShell2 {\n\tprotected Shell loginShell;\n\tprivate Text Account_textField;\n\tprivate Text Password_textField;\n\tConnection connection;\n\tpublic Statement statement;\n\tString account;\n\tString password;\n\t\/\/static Shell parentShell;\n\t\/**\n\t * Launch the application.\n\t * @param args\n\t *\/\n\tpublic static void main(String&#91;] args){\n\t\ttry {\n\t\t\tLoginShell2 window = new LoginShell2();\n\t\t\twindow.open();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}\n\t\/**\n\t * Open the window.\n\t *\/\n\tpublic void open() {\n\t\tDisplay display = Display.getDefault();\n\t\tcreateContents();\n\t\tloginShell.open();\n\t\tloginShell.layout();\n\t\twhile (!loginShell.isDisposed()) {\n\t\t\tif (!display.readAndDispatch()) {\n\t\t\t\tdisplay.sleep();\n\t\t\t}\n\t\t}\n\t}\n\t\/**\n\t * Create contents of the window.\n\t *\/\n\tprotected void createContents(){\n\t\tloginShell = new Shell();\n\t\tloginShell.setSize(314, 187);\n\t\tloginShell.setText(\"u767Bu5F55\");\n\t\tloginShell.setMaximumSize(314, 187);\n\t\tloginShell.setMinimumSize(314, 187);\n\t\t\n\t\tLabel label = new Label(loginShell, SWT.NONE);\n\t\tlabel.setBounds(31, 23, 40, 17);\n\t\tlabel.setText(\"u8D26u53F7\");\n\t\t\n\t\tLabel lblNewLabel = new Label(loginShell, SWT.NONE);\n\t\tlblNewLabel.setBounds(31, 69, 40, 17);\n\t\tlblNewLabel.setText(\"u5BC6u7801\");\n\t\t\n\t\tAccount_textField = new Text(loginShell, SWT.BORDER);\n\t\tAccount_textField.setText(\"00000000\");\n\t\tAccount_textField.setBounds(80, 20, 163, 23);\n\t\t\n\t\tPassword_textField = new Text(loginShell, SWT.BORDER | SWT.PASSWORD);\n\t\tPassword_textField.setText(\"password\");\n\t\tPassword_textField.setBounds(80, 66, 163, 23);\n\t\t\n\t\ttry {\n\t\t\tconnection=DriverManager.getConnection(\"jdbc:mysql:\/\/localhost\/Library\",\"scott\",\"tiger\");\n\t\t\tstatement=connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE);\n\t\t} catch (Exception e) {\n\t\t\t\/\/ TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tButton LoginButton = new Button(loginShell, SWT.NONE);\n\t\tLoginButton.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e){\n\t\t\t\t\/\/\u8fde\u63a5\u6570\u636e\u5e93\n\t\t\t\ttry {\n\t\t\t\t\t\/\/Class.forName(\"com.mysql.jdbc.Driver\");\n\t\t\t\t\t\/\/Class.forName(\"om.mysql.cj.jdbc.Driver\");\n\t\t\t\t\t\/\/Connection connection=DriverManager.getConnection(\"jdbc:mysql:\/\/localhost\/Library\",\"scott\",\"tiger\");\n\t\t\t\t\t\/\/Statement statement=connection.createStatement();\n\t\t\t\t\taccount=Account_textField.getText();\n\t\t\t\t\tpassword=Password_textField.getText();\n\t\t\t\t\tResultSet resultSet=statement.executeQuery(\"select userpassword,userrole from users where userAccount='\"+account+\"'\");\n\t\t\t\t\tresultSet.next();\n\t\t\t\t\tString queried_role;\n\t\t\t\t\tif(!account.equals(\"\")) {\n\t\t\t\t\t\tif(!password.equals(\"\")) {\n\t\t\t\t\t\t\tif(resultSet.getString(1).equals(password)) {\n\t\t\t\t\t\t\t\tswitch (resultSet.getString(2)) {\n\t\t\t\t\t\t\t\tcase \"\u9ad8\u7ea7\u7ba1\u7406\u5458\":\n\t\t\t\t\t\t\t\t\tMainUI mainUI=new MainUI(account,\"\u9ad8\u7ea7\u7ba1\u7406\u5458\",new String&#91;] {\"\u6240\u6709\u4e66\u7c4d\",\"\u6240\u6709\u7528\u6237\",\"\u6240\u6709\u501f\u9605\u72b6\u6001\",\"\u6211\u7684\u501f\u9605\u72b6\u6001\"},statement);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase \"\u666e\u901a\u7ba1\u7406\u5458\":\n\t\t\t\t\t\t\t\t\tmainUI=new MainUI(account,\"\u666e\u901a\u7ba1\u7406\u5458\",new String&#91;] {\"\u6240\u6709\u4e66\u7c4d\",\"\u6240\u6709\u501f\u9605\u72b6\u6001\",\"\u6211\u7684\u501f\u9605\u72b6\u6001\"},statement);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase \"\u666e\u901a\u7528\u6237\":\n\t\t\t\t\t\t\t\t\tmainUI=new MainUI(account,\"\u666e\u901a\u7528\u6237\",new String&#91;] {\"\u6240\u6709\u4e66\u7c4d\",\"\u6211\u7684\u501f\u9605\u72b6\u6001\"},statement);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tloginShell.close();\n\t\t\t\t\t\t\t\tMainUI.main(null);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tMessageBox messageBox=new MessageBox(loginShell,SWT.ICON_INFORMATION|SWT.OK);\n\t\t\t\t\t\t\t\tmessageBox.setText(\"\u63d0\u793a\");\n\t\t\t\t\t\t\t\tmessageBox.setMessage(\"\u7528\u6237\u540d\u6216\u5bc6\u7801\u9519\u8bef\uff0c\u8bf7\u91cd\u65b0\u8f93\u5165\uff01\");\n\t\t\t\t\t\t\t\tint message=messageBox.open();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tMessageBox messageBox=new MessageBox(loginShell,SWT.ICON_INFORMATION|SWT.OK);\n\t\t\t\t\t\t\tmessageBox.setText(\"\u63d0\u793a\");\n\t\t\t\t\t\t\tmessageBox.setMessage(\"\u5bc6\u7801\u4e0d\u80fd\u4e3a\u7a7a\uff01\");\n\t\t\t\t\t\t\tint message=messageBox.open();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tMessageBox messageBox=new MessageBox(loginShell,SWT.ICON_INFORMATION|SWT.OK);\n\t\t\t\t\t\tmessageBox.setText(\"\u63d0\u793a\");\n\t\t\t\t\t\tmessageBox.setMessage(\"\u7528\u6237\u540d\u4e0d\u80fd\u4e3a\u7a7a\uff01\");\n\t\t\t\t\t\tint message=messageBox.open();\n\t\t\t\t\t\t\/\/e.doit=message==SWT.YES;\n\t\t\t\t\t\treturn ;\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e2) {\n\t\t\t\t\t\/\/ TODO: handle exception\n\t\t\t\t\te2.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tLoginButton.setBounds(31, 106, 80, 27);\n\t\tLoginButton.setText(\"u767Bu5F55\");\n\t\t\n\t\tButton CancelButton = new Button(loginShell, SWT.NONE);\n\t\tCancelButton.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tloginShell.close();\t\n\t\t\t}\n\t\t});\n\t\tCancelButton.setBounds(163, 106, 80, 27);\n\t\tCancelButton.setText(\"u53D6u6D88\");\n\t}\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u4e3b\u754c\u9762 MainUI<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">MainUI.java:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<pre class=\"language-sql wp-block-code\"><code class=\"language-sql\">import java.sql.ResultSet;\nimport java.sql.Statement;\nimport org.eclipse.swt.SWT;\nimport org.eclipse.swt.events.ExpandEvent;\nimport org.eclipse.swt.events.ExpandListener;\nimport org.eclipse.swt.events.SelectionAdapter;\nimport org.eclipse.swt.events.SelectionEvent;\nimport org.eclipse.swt.events.SelectionListener;\nimport org.eclipse.swt.widgets.Button;\nimport org.eclipse.swt.widgets.Composite;\nimport org.eclipse.swt.widgets.Display;\nimport org.eclipse.swt.widgets.ExpandBar;\nimport org.eclipse.swt.widgets.ExpandItem;\nimport org.eclipse.swt.widgets.Shell;\npublic class MainUI {\n\tprotected Shell shell;\n\tstatic String account=\"\";\n\tstatic String role=\"\";\n\tstatic String&#91;] itemArray= {};\n\tstatic ResultSet resultSet=null;\n\tstatic Statement statement=null;\n\tComposite itemComposite=null;\n\tExpandBar expandBar=null;\n\tpublic MainUI(String newAccount,String newRole,String &#91;] newItemArray,Statement newStatement) {\n\t\t\/\/ TODO Auto-generated constructor stub\n\t\taccount=newAccount;\n\t\trole=newRole;\n\t\titemArray=newItemArray;\n\t\t\/\/resultSet=newResultSet;\n\t\tstatement=newStatement;\t\t\n\t}\n\t\/**\n\t * Launch the application.\n\t * @param args\n\t *\/\n\tpublic static void main(String&#91;] args) {\n\t\ttry {\n\t\t\tMainUI window = new MainUI(account,role,itemArray,statement);\n\t\t\twindow.open();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}\n\t\/**\n\t * Open the window.\n\t *\/\n\tpublic void open() {\n\t\tDisplay display = Display.getDefault();\n\t\tcreateContents();\n\t\tshell.open();\n\t\tshell.layout();\n\t\twhile (!shell.isDisposed()) {\n\t\t\tif (!display.readAndDispatch()) {\n\t\t\t\tdisplay.sleep();\n\t\t\t}\n\t\t}\n\t}\n\t\/**\n\t * Create contents of the window.\n\t *\/\n\tprotected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(786,499);\n\t\tString userName=\"\";\n\t\ttry {\n\t\t\t\n\t\t\tresultSet= statement.executeQuery(\"select userName from users where userAccount='\"+account+\"'\");\n\t\t\tresultSet.next();\n\t\t\tuserName=resultSet.getString(1);\n\t\t} catch (Exception e) {\n\t\t\t\/\/ TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t}\n\t\tshell.setText(\"\u6b22\u8fce\u4f7f\u7528\u56fe\u4e66\u7ba1\u7406\u7cfb\u7edf-\"+account+\"-\"+userName+\"(\"+role+\")\");\n\t\tshell.setMaximumSize(786, 500);\n\t\tshell.setMinimumSize(786,500);\n\t\tif(role.equals(\"\u9ad8\u7ea7\u7ba1\u7406\u5458\")) {\n\t\t\tButton settingBtn=new Button(shell,SWT.None);\n\t\t\tsettingBtn.setText(\"\u8bbe\u7f6e\");\n\t\t\tsettingBtn.setBounds(410,10,80,27);\n\t\t\tsettingBtn.addSelectionListener(new SelectionListener() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\n\t\t\t\t\t\/\/ TODO Auto-generated method stub\n\t\t\t\t\ttry {\t\t\t\t\t\n\t\t\t\t\t\tresultSet=statement.executeQuery(\"select * from settings\");\n\t\t\t\t\t\tresultSet.next();\n\t\t\t\t\t\tString maxAllowedTotalBorrowCountStr=resultSet.getString(1);\n\t\t\t\t\t\tString maxAllowedSingleBorrowCountStr=resultSet.getString(2);\n\t\t\t\t\t\t\/\/new OperationPanel(account,userName, operationStr,objectStr,tipStr,labelStrArray,defaultValuesArray,editAllowedArray, statement);\n\t\t\t\t\t\tOperationPanel settingOperationPanel=new OperationPanel(\"\",\"\",\"\u8bbe\u7f6e\",\"\",\"\u8bf7\u8f93\u5165\u4ee5\u4e0b\u9009\u9879\",new String&#91;] {\"\u6700\u5927\u53ef\u501f\u6570\u91cf\",\"\u5355\u672c\u6700\u5927\u53ef\u501f\u6570\u91cf\"},new String&#91;] {maxAllowedTotalBorrowCountStr,maxAllowedSingleBorrowCountStr},new Boolean&#91;] {true,true},statement);\n\t\t\t\t\t\tsettingOperationPanel.main(null);\n\t\t\t\t\t}catch (Exception e) {\n\t\t\t\t\t\t\/\/ TODO: handle exception\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void widgetDefaultSelected(SelectionEvent arg0) {\n\t\t\t\t\t\/\/ TODO Auto-generated method stub\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\t\n\t\tupdate();\n\t\tButton updateBtn = new Button(shell, SWT.NONE);\n\t\tupdateBtn.setBounds(500, 10, 80, 27);\n\t\tupdateBtn.setText(\"u66F4u65B0\");\n\t\tupdateBtn.addSelectionListener(new SelectionListener() {\t\t\t\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\n\t\t\t\t\/\/ TODO Auto-generated method stub\n\t\t\t\t\/\/expandBar.set\n\t\t\t\tupdate();\n\t\t\t}\t\t\t\n\t\t\t@Override\n\t\t\tpublic void widgetDefaultSelected(SelectionEvent arg0) {\n\t\t\t\t\/\/ TODO Auto-generated method stub\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tButton BackwardBtn = new Button(shell, SWT.NONE);\n\t\tBackwardBtn.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tLoginShell2 loginShell2=new LoginShell2();\n\t\t\t\tloginShell2.main(null);\n\t\t\t}\n\t\t});\n\t\tBackwardBtn.setBounds(590, 10, 80, 27);\n\t\tBackwardBtn.setText(\"u8FD4u56DEu767Bu5F55u9875u9762\");\n\t\t\n\t\tButton exitBtn = new Button(shell, SWT.NONE);\n\t\texitBtn.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t}\n\t\t});\n\t\texitBtn.setBounds(680, 10, 80, 27);\n\t\texitBtn.setText(\"\u9000\u51fa\");\n\t\t\n\t\t\n\t}\t\n\tvoid update() {\t\t\n\t\tif(expandBar!=null)\n\t\t\texpandBar.dispose();\n\t\texpandBar=new ExpandBar(shell, 0);\n\t\texpandBar.setBounds(10, 38, 750, 425);\n\t\texpandBar.addExpandListener(new ExpandListener() {\t\t\n\t\t\t@Override\n\t\t\tpublic void itemExpanded(ExpandEvent arg0) {\n\t\t\t\t\/\/ TODO Auto-generated method stub\n\t\t\t\tfor(ExpandItem item:expandBar.getItems()) {\n\t\t\t\t\titem.setExpanded(false);\/\/\u8fd9\u91cc\u5faa\u73af\u8bbe\u7f6e\u5176\u4ed6\u6269\u5c55\u9879\u5173\u95ed\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t\t@Override\n\t\t\tpublic void itemCollapsed(ExpandEvent arg0) {\n\t\t\t\t\/\/ TODO Auto-generated method stub \u8fd9\u4e2a\u4e0d\u7528\u7ba1\n\t\t\t}\n\t\t});\n\t\tfor(String expandItemStr:itemArray) {\t\t\t\n\t\t\tString&#91;] tableHeadersStrArray= {};\n\t\t\tString&#91;] operationStrArray= {};\n\t\t\tString tableName=\"\";\n\t\t\tswitch (expandItemStr) {\n\t\t\tcase \"\u6240\u6709\u4e66\u7c4d\":\n\t\t\t\ttry {\n\t\t\t\t\ttableName=\"books\";\n\t\t\t\t\tif (role.indexOf(\"\u7ba1\u7406\u5458\")!=-1)\n\t\t\t\t\t\toperationStrArray=new String&#91;] {\"\u6dfb\u52a0\",\"\u5220\u9664\",\"\u4fee\u6539\",\"\u67e5\u627e\"};\n\t\t\t\t\telse\n\t\t\t\t\t\toperationStrArray=new String&#91;] {\"\u67e5\u627e\"};\t\t\t\t\t\n\t\t\t\t\ttableHeadersStrArray=new String&#91;] {\"ISBN\",\"\u4e66\u540d\",\"\u4f5c\u8005\",\"\u7c7b\u578b\",\"\u51fa\u7248\u793e\",\"\u51fa\u7248\u65e5\u671f\",\"\u9986\u85cf\u6570\u91cf\",\"\u501f\u51fa\u6570\u91cf\",\"\u672a\u501f\u51fa\u6570\u91cf\",\"\u72b6\u6001\",\"\u6dfb\u52a0\u65e5\u671f\"};\n\t\t\t\t\tresultSet=statement.executeQuery(\"select isbn,bookName,author,bookType,publisher,publishDate,totalCount,borrowedCount,unborrowedCount,bookState,addBookDate from books\");\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\/\/ TODO: handle exception\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\t\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase \"\u6240\u6709\u7528\u6237\":\n\t\t\t\ttry {\n\t\t\t\t\ttableName=\"users\";\n\t\t\t\t\toperationStrArray=new String&#91;] {\"\u6dfb\u52a0\",\"\u5220\u9664\",\"\u4fee\u6539\",\"\u67e5\u627e\"};\n\t\t\t\t\ttableHeadersStrArray=new String&#91;] {\"\u7528\u6237\u540d\",\"\u59d3\u540d\",\"\u5bc6\u7801\",\"\u8eab\u4efd\",\"\u72b6\u6001\",\"\u6dfb\u52a0\u65e5\u671f\"};\n\t\t\t\t\tresultSet=statement.executeQuery(\"select userAccount,userName,userPassword,userRole,userState,addUserDate from users\");\t\t\t\t\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\/\/ TODO: handle exception\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase \"\u6240\u6709\u501f\u9605\u72b6\u6001\":\n\t\t\t\ttry {\n\t\t\t\t\ttableName=\"states\";\n\t\t\t\t\toperationStrArray=new String&#91;] {\"\u67e5\u627e\"};\n\t\t\t\t\ttableHeadersStrArray=new String&#91;] {\"\u7528\u6237\u540d\",\"\u59d3\u540d\",\"ISBN\",\"\u4e66\u540d\",\"\u5171\u501f\",\"\u5df2\u8fd8\",\"\u672a\u8fd8\"};\n\t\t\t\t\tresultSet=statement.executeQuery(\"select userAccount,userName,isbn,bookName,borrowedCount,returnedCount,unReturnedCount from states\");\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\/\/ TODO: handle exception\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"\u6211\u7684\u501f\u9605\u72b6\u6001\":\n\t\t\t\ttry {\n\t\t\t\t\ttableName=\"mystates\";\n\t\t\t\t\toperationStrArray=new String&#91;] {\"\u67e5\u627e\"};\n\t\t\t\t\ttableHeadersStrArray=new String&#91;] {\"\u7528\u6237\u540d\",\"\u59d3\u540d\",\"ISBN\",\"\u4e66\u540d\",\"\u5171\u501f\",\"\u5df2\u8fd8\",\"\u672a\u8fd8\"};\n\t\t\t\t\tresultSet=statement.executeQuery(\"select userAccount,userName,isbn,bookName,borrowedCount,returnedCount,unReturnedCount from states where userAccount='\"+account+\"'\");\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\/\/ TODO: handle exception\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\titemComposite=new Composite(expandBar, 0);\n\t\t\t\/\/OperationComposite(Composite parent, int style,String newAccount,String newRole,String tableName,String&#91;] btnStrArray,String&#91;] tableHeadersStrArray,String &#91;] contextStrArray,ResultSet resultSet,Statement newStatement) {\n\t\t\tnew OperationComposite(shell, itemComposite, SWT.MULTI,account,role, tableName,operationStrArray,tableHeadersStrArray, resultSet,statement);\n\t\t\tExpandItem expandItem=new ExpandItem(expandBar, 0);\t\t\t\n\t\t\texpandItem.setControl(itemComposite);\n\t\t\texpandItem.setHeight(310);\n\t\t\texpandItem.setText(expandItemStr);\n\t\t\tif(expandItemStr.equals(\"\u6240\u6709\u4e66\u7c4d\"))\n\t\t\t\texpandItem.setExpanded(true);\n\t\t}\n\t}\n}<\/code><\/pre>\n\n\n\n\n\n\n\n<h4 class=\"wp-block-heading\">\u754c\u9762\u5bb9\u5668 OperationComposition<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">OperationComposition.java:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<pre class=\"language-sql wp-block-code\"><code class=\"language-sql\">import java.sql.ResultSet;\nimport java.sql.Statement;\nimport java.util.ResourceBundle.Control;\nimport org.eclipse.jface.dialogs.MessageDialog;\nimport org.eclipse.swt.SWT;\nimport org.eclipse.swt.events.SelectionAdapter;\nimport org.eclipse.swt.events.SelectionEvent;\nimport org.eclipse.swt.layout.FillLayout;\nimport org.eclipse.swt.layout.GridData;\nimport org.eclipse.swt.layout.GridLayout;\nimport org.eclipse.swt.layout.RowLayout;\nimport org.eclipse.swt.widgets.Button;\nimport org.eclipse.swt.widgets.Composite;\nimport org.eclipse.swt.widgets.Group;\nimport org.eclipse.swt.widgets.MessageBox;\nimport org.eclipse.swt.widgets.Shell;\nimport org.eclipse.swt.widgets.TableColumn;\nimport org.eclipse.swt.widgets.TableItem;\npublic class OperationComposite extends Composite {\n\tStatement statement;\n\tString userState;\n\t\/**\n\t * Create the composite.\n\t * @param parent\n\t * @param style\n\t *\/\n\tpublic OperationComposite(Composite parent, int style) {\n\t\tsuper(parent, style);\t\n\t}\n\t\/**\n\t * @param parent\n\t * @param style\n\t * @param newAccount\n\t * @param newRole\n\t * @param tableName\n\t * @param btnStrArray\n\t * @param tableHeadersStrArray\n\t * @param resultSet\n\t * @param newStatement\n\t *\/\n\tpublic OperationComposite(Shell shell, Composite parent, int style,String newAccount,String newRole,String tableName,String&#91;] btnStrArray,String&#91;] tableHeadersStrArray,ResultSet resultSet,Statement newStatement) {\n\t\tsuper(parent, style);\n\t\tstatement=newStatement;\n\t\tComposite menuComposite=new Composite(parent, SWT.None);\t\t\n\t\tmenuComposite.setBounds(10, 10, 722, 35);\n\t\tGroup group=new Group(parent, SWT.CENTER);\n\t\t\/\/group.setText(tableName);\n\t\tgroup.setBounds(10, 51, 722, 243);\n\t\tnew ExtendedTable(shell,group, SWT.CENTER|SWT.MULTI|SWT.FULL_SELECTION,newAccount,newRole,tableName,tableHeadersStrArray,statement,resultSet).setBounds(10, 20, 701, 213);\n\t\tint i=0;\n\t\t\/\/String userState=\"\";\n\t\ttry {\n\t\t\tResultSet resultSet2=statement.executeQuery(\"select userState from users where userAccount=\"+newAccount);\n\t\t\tresultSet2.next();\n\t\t\tuserState=resultSet2.getString(1);\n\t\t} catch (Exception e) {\n\t\t\t\/\/ TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t}\t\t\n\t\tfor(String btnStr:btnStrArray) {\n\t\t\tButton button = new Button(menuComposite, SWT.PUSH);\n\t\t\tbutton.setBounds(110*i+110,3,70,30);\n\t\t\tbutton.setText(btnStr);\n\t\t\t\/\/System.out.println(\"constructed\");\n\t\t\tbutton.addSelectionListener(new SelectionAdapter() {\n\t\t\t\t@Override\n\t\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\tswitch (btnStr) {\n\t\t\t\t\tcase \"\u6dfb\u52a0\":{\n\t\t\t\t\t\tif(userState.equals(\"\u51bb\u7ed3\")) {\n\t\t\t\t\t\t\tMessageBox messageBox=new MessageBox(shell,SWT.ICON_INFORMATION|SWT.OK);\n\t\t\t\t\t\t\tmessageBox.setText(\"\u63d0\u793a\");\n\t\t\t\t\t\t\tmessageBox.setMessage(\"\u60a8\u7684\u8d26\u53f7\u5df2\u88ab\u51bb\u7ed3\uff0c\u4ec5\u80fd\u8fd8\u4e66\u548c\u67e5\u8be2!\");\n\t\t\t\t\t\t\tmessageBox.open();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tswitch (tableName) {\n\t\t\t\t\t\tcase \"books\":\n\t\t\t\t\t\t\tOperationPanel addBooksOperationPanel=new OperationPanel(\"\",\"\", \"\u6dfb\u52a0\",\"\u4e66\u7c4d\",\"\u8bf7\u8f93\u5165\u4ee5\u4e0b\u4fe1\u606f\",new String&#91;] {\"ISBN\",\"\u4e66\u540d\",\"\u4f5c\u8005\",\"\u7c7b\u578b\",\"\u51fa\u7248\u793e\",\"\u51fa\u7248\u65e5\u671f\",\"\u5165\u5e93\u6570\u91cf\",\"\u5165\u5e93\u65e5\u671f\"},new String&#91;] {},new Boolean&#91;] {}, statement);\/\/\u7528\u4e0d\u5230\u7684\u4f20\u4e2a\u7a7a\u503c\u5c31\u884c\n\t\t\t\t\t\t\taddBooksOperationPanel.main(null);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"users\":\n\t\t\t\t\t\t\tOperationPanel addUsersOperationPanel=new OperationPanel(\"\",\"\",\"\u6dfb\u52a0\",\"\u7528\u6237\",\"\u8bf7\u8f93\u5165\u4ee5\u4e0b\u4fe1\u606f\",new String&#91;] {\"\u7528\u6237\u540d\",\"\u59d3\u540d\",\"\u5bc6\u7801\",\"\u8eab\u4efd\u7c7b\u578b\",\"\u6dfb\u52a0\u65e5\u671f\"},new String&#91;] {},new Boolean&#91;] {},statement);\n\t\t\t\t\t\t\taddUsersOperationPanel.main(null);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tcase \"\u5220\u9664\":{\n\t\t\t\t\t\tif(userState.equals(\"\u51bb\u7ed3\")) {\n\t\t\t\t\t\t\tMessageBox messageBox=new MessageBox(shell,SWT.ICON_INFORMATION|SWT.OK);\n\t\t\t\t\t\t\tmessageBox.setText(\"\u63d0\u793a\");\n\t\t\t\t\t\t\tmessageBox.setMessage(\"\u60a8\u7684\u8d26\u53f7\u5df2\u88ab\u51bb\u7ed3\uff0c\u4ec5\u80fd\u8fdb\u884c\u8fd8\u4e66\u548c\u67e5\u8be2!\");\n\t\t\t\t\t\t\tmessageBox.open();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tswitch (tableName) {\n\t\t\t\t\t\tcase \"books\":\n\t\t\t\t\t\t\tOperationPanel deleteBooksOperationPanel=new OperationPanel(\"\",\"\",\"\u5220\u9664\",\"\u4e66\u7c4d\",\"\u5c06\u4f1a\u6839\u636eISBN\u5220\u9664\u4e66\u7c4d\",new String&#91;] {\"ISBN\"},new String&#91;] {},new Boolean&#91;] {},statement);\n\t\t\t\t\t\t\tdeleteBooksOperationPanel.main(null);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"users\":{\n\t\t\t\t\t\t\tOperationPanel deleteUsersOperationPanel=new OperationPanel(\"\",\"\",\"\u5220\u9664\",\"\u7528\u6237\",\"\u5c06\u4f1a\u6839\u636e\u7528\u6237\u540d\u5220\u9664\u7528\u6237\",new String&#91;] {\"\u7528\u6237\u540d\"},new String&#91;] {},new Boolean&#91;] {},statement);\n\t\t\t\t\t\t\tdeleteUsersOperationPanel.main(null);\n\t\t\t\t\t\t\tbreak;\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"\u4fee\u6539\":{\n\t\t\t\t\t\tif(userState.equals(\"\u51bb\u7ed3\")) {\n\t\t\t\t\t\t\tMessageBox messageBox=new MessageBox(shell,SWT.ICON_INFORMATION|SWT.OK);\n\t\t\t\t\t\t\tmessageBox.setText(\"\u63d0\u793a\");\n\t\t\t\t\t\t\tmessageBox.setMessage(\"\u60a8\u7684\u8d26\u53f7\u5df2\u88ab\u51bb\u7ed3\uff0c\u4ec5\u80fd\u8fdb\u884c\u8fd8\u4e66\u548c\u67e5\u8be2!\");\n\t\t\t\t\t\t\tmessageBox.open();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tswitch (tableName) {\n\t\t\t\t\t\tcase \"books\":\n\t\t\t\t\t\t\tOperationPanel modifyBooksOperationPanel=new OperationPanel(\"\",\"\",\"\u4fee\u6539\",\"\u4e66\u7c4d\",\"\u5c06\u4f1a\u6839\u636eISBN\u4fee\u6539\u4e66\u7c4d\u4fe1\u606f\",new String&#91;] {\"ISBN\",\"\u4e66\u540d\",\"\u4f5c\u8005\",\"\u7c7b\u578b\",\"\u51fa\u7248\u793e\",\"\u51fa\u7248\u65e5\u671f\",\"\u5165\u5e93\u6570\u91cf\",\"\u5165\u5e93\u65e5\u671f\",\"\u72b6\u6001\"},new String&#91;] {},new Boolean&#91;] {},statement);\n\t\t\t\t\t\t\t\/\/OperationPanel addBooksOperationPanel=new OperationPanel();\n\t\t\t\t\t\t\tmodifyBooksOperationPanel.main(null);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"users\":\n\t\t\t\t\t\t\tOperationPanel modifyUsersOperationPanel=new OperationPanel(\"\",\"\",\"\u4fee\u6539\",\"\u7528\u6237\",\"\u5c06\u4f1a\u6839\u636e\u7528\u6237\u540d\u4fee\u6539\u7528\u6237\u4fe1\u606f\",new String&#91;] {\"\u7528\u6237\u540d\",\"\u59d3\u540d\",\"\u5bc6\u7801\",\"\u8eab\u4efd\u7c7b\u578b\",\"\u6dfb\u52a0\u65e5\u671f\",\"\u72b6\u6001\"},new String&#91;] {},new Boolean&#91;] {},statement);\n\t\t\t\t\t\t\tmodifyUsersOperationPanel.main(null);\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"\u67e5\u627e\":{\n\t\t\t\t\t\tswitch (tableName) {\n\t\t\t\t\t\tcase \"books\":\n\t\t\t\t\t\t\tSearchUI searchBookUI=new SearchUI(newAccount,newRole,\"\u4e66\u7c4d\", new String&#91;] {\"ISBN\",\"\u4e66\u540d\",\"\u4f5c\u8005\",\"\u51fa\u7248\u793e\"}, statement);\n\t\t\t\t\t\t\tsearchBookUI.main(null);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"users\":\n\t\t\t\t\t\t\tSearchUI searchUserUI=new SearchUI(newAccount,newRole,\"\u7528\u6237\", new String&#91;] {\"\u7528\u6237\u540d\",\"\u59d3\u540d\"}, statement);\n\t\t\t\t\t\t\tsearchUserUI.main(null);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\/\/case \"records\":\n\t\t\t\t\t\tcase \"states\":\n\t\t\t\t\t\t\tSearchUI searchStateUI=new SearchUI(newAccount,newRole,\"\u501f\u9605\u72b6\u6001\",new String&#91;] {\"\u7528\u6237\u540d\",\"\u59d3\u540d\",\"ISBN\",\"\u4e66\u540d\"} , statement);\n\t\t\t\t\t\t\tsearchStateUI.main(null);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"mystates\":\n\t\t\t\t\t\t\tSearchUI searchMyStateUI=new SearchUI(newAccount,newRole,\"\u6211\u7684\u501f\u9605\u72b6\u6001\",new String&#91;] {\"ISBN\",\"\u4e66\u540d\"} , statement);\n\t\t\t\t\t\t\tsearchMyStateUI.main(null);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\t\n\t\t\ti++;\n\t\t}\n\t\t}\n\t@Override\n\tprotected void checkSubclass() {\n\t\t\/\/ Disable the check that prevents subclassing of SWT components\n\t}\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u6269\u5c55\u8868\u683c ExtendedTable<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">ExtendedTable.java:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<pre class=\"language-sql wp-block-code\"><code class=\"language-sql\">import java.sql.ResultSet;\nimport java.sql.Statement;\nimport java.text.SimpleDateFormat;\nimport java.util.Date;\nimport org.eclipse.swt.SWT;\nimport org.eclipse.swt.events.SelectionAdapter;\nimport org.eclipse.swt.events.SelectionEvent;\nimport org.eclipse.swt.events.SelectionListener;\nimport org.eclipse.swt.widgets.Composite;\nimport org.eclipse.swt.widgets.Display;\nimport org.eclipse.swt.widgets.Event;\nimport org.eclipse.swt.widgets.ExpandBar;\nimport org.eclipse.swt.widgets.ExpandItem;\nimport org.eclipse.swt.widgets.Group;\nimport org.eclipse.swt.widgets.Listener;\nimport org.eclipse.swt.widgets.Menu;\nimport org.eclipse.swt.widgets.MenuItem;\nimport org.eclipse.swt.widgets.MessageBox;\nimport org.eclipse.swt.widgets.Shell;\nimport org.eclipse.swt.widgets.Table;\nimport org.eclipse.swt.widgets.TableColumn;\nimport org.eclipse.swt.widgets.TableItem;\n\/\/import org.eclipse.wb.swt.AdminUI;\npublic class ExtendedTable extends Table{\n\tString&#91;] headerStrArray;\n\tString&#91;] contextStrArray= {};\n\tString contextStr;\n\tstatic Shell shell;\n\tprotected void checkSubclass() {        \n\t    \/\/ TODO Auto-generated method stub        \n\t}\n\tpublic ExtendedTable(Composite composite,int i) {\n\t\tsuper(composite, i);\n\t\t\/\/ TODO Auto-generated constructor stub\n\t}\n\tpublic ExtendedTable(Shell shell,Group group, int style,String newAccount,String newRole,String tableName,String&#91;] headerStrArray,Statement statement,ResultSet resultSet) {\n\t\t\/\/ TODO Auto-generated constructor stub\n\t\tsuper(group, style);\n\t\t\/\/super(shell, style);\t\t\n\t\t\/\/Table table=new Table(group, 0);\n\t\tsetHeaderVisible(true); \n\t\tsetLinesVisible(true);\n\t\t\n\t\tfor(String headerStr:headerStrArray) {\n\t\t\tTableColumn tableColumn= new TableColumn(this, 0);\n\t\t\ttableColumn.setText(headerStr);\n\t\t\ttableColumn.setWidth(700\/headerStrArray.length);\n\t\t}\t\t\t\n\t\ttry {\n\t\t\twhile(resultSet.next()) {\n\t\t\t\tTableItem tableItem=new TableItem(this, SWT.MULTI);\n\t\t\t\tfor(int i=1;i&amp;lt;=headerStrArray.length;i++) {\n\t\t\t\t\ttableItem.setText(i-1, resultSet.getString(i));\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t\/\/ TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t}\n\t\taddSelectionListener(new SelectionListener() {\t\t\t\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\n\t\t\t\t\/\/ TODO Auto-generated method stub\n\t\t\t\t\/\/System.out.println(\"selected\");\n\t\t\t\tswitch (tableName) {\n\t\t\t\tcase \"books\":\n\t\t\t\t\tString userState=\"\u6b63\u5e38\";\n\t\t\t\t\ttry {\n\t\t\t\t\t\tResultSet resultSet=statement.executeQuery(\"select userState from users where userAccount='\"+newAccount+\"'\");\n\t\t\t\t\t\tresultSet.next();\n\t\t\t\t\t\tuserState=resultSet.getString(1);\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\/\/ TODO: handle exception\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\tif(userState.equals(\"\u6b63\u5e38\")) {\t\t\t\t\t\n\t\t\t\t\t\tif(newRole.indexOf(\"\u7ba1\u7406\u5458\")!=-1) {\n\t\t\t\t\t\t\tif(getSelectionIndices().length==1) {\n\t\t\t\t\t\t\t\tString isbn=getSelection()&#91;0].getText(0);\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tResultSet stateResultSet=statement.executeQuery(\"select * from states where userAccount='\"+newAccount+\"' and isbn='\"+isbn+\"'\");\n\t\t\t\t\t\t\t\t\tif(stateResultSet.next() &amp;amp;&amp;amp; Integer.parseInt(stateResultSet.getString(8))>0) {\/\/\u5982\u679c\u6709\u672a\u8fd8\u7684\u4e66\n\t\t\t\t\t\t\t\t\t\tResultSet bookResultSet=statement.executeQuery(\"select * from books where isbn='\"+isbn+\"'\");\n\t\t\t\t\t\t\t\t\t\tbookResultSet.next();\n\t\t\t\t\t\t\t\t\t\tif(bookResultSet.getString(11).equals(\"\u6b63\u5e38\") &amp;amp;&amp;amp; Integer.parseInt(bookResultSet.getString(10))>0)\n\t\t\t\t\t\t\t\t\t\t\tcontextStrArray= new String&#91;]{\"\u501f\u9605\",\"\u5f52\u8fd8\",\"\u4fee\u6539\",\"\u5220\u9664\"};\n\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\tcontextStrArray= new String&#91;]{\"\u5f52\u8fd8\",\"\u4fee\u6539\",\"\u5220\u9664\"};\n\t\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\tResultSet bookResultSet=statement.executeQuery(\"select * from books where isbn='\"+isbn+\"'\");\n\t\t\t\t\t\t\t\t\t\tbookResultSet.next();\n\t\t\t\t\t\t\t\t\t\tif(bookResultSet.getString(11).equals(\"\u6b63\u5e38\") &amp;amp;&amp;amp; Integer.parseInt(bookResultSet.getString(10))>0)\n\t\t\t\t\t\t\t\t\t\t\tcontextStrArray= new String&#91;]{\"\u501f\u9605\",\"\u4fee\u6539\",\"\u5220\u9664\"};\n\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\tcontextStrArray= new String&#91;]{\"\u4fee\u6539\",\"\u5220\u9664\"};\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t\t\/\/ TODO: handle exception\n\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\t\t\t\t\n\t\t\t\t\t\t\tif(getSelectionIndices().length>1)\n\t\t\t\t\t\t\t\tcontextStrArray= new String&#91;]{\"\u5220\u9664\"};\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tif(getSelectionIndices().length==1) {\n\t\t\t\t\t\t\t\tString isbn=getSelection()&#91;0].getText(0);\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tResultSet stateResultSet=statement.executeQuery(\"select * from states where userAccount='\"+newAccount+\"' and isbn='\"+isbn+\"'\");\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif(stateResultSet.next() &amp;amp;&amp;amp; Integer.parseInt(stateResultSet.getString(8))>0) {\/\/\u5982\u679c\u6709\u672a\u8fd8\u7684\u4e66\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tResultSet bookResultSet=statement.executeQuery(\"select * from books where isbn='\"+isbn+\"'\");\n\t\t\t\t\t\t\t\t\t\tbookResultSet.next();\n\t\t\t\t\t\t\t\t\t\tif(bookResultSet.getString(11).equals(\"\u6b63\u5e38\") &amp;amp;&amp;amp; Integer.parseInt(bookResultSet.getString(10))>0)\n\t\t\t\t\t\t\t\t\t\t\tcontextStrArray= new String&#91;]{\"\u501f\u9605\",\"\u5f52\u8fd8\"};\n\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\tcontextStrArray= new String&#91;]{\"\u5f52\u8fd8\"};\n\t\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\tResultSet bookResultSet=statement.executeQuery(\"select * from books where isbn='\"+isbn+\"'\");\n\t\t\t\t\t\t\t\t\t\tbookResultSet.next();\n\t\t\t\t\t\t\t\t\t\tif(bookResultSet.getString(11).equals(\"\u6b63\u5e38\") &amp;amp;&amp;amp; Integer.parseInt(bookResultSet.getString(10))>0)\n\t\t\t\t\t\t\t\t\t\t\tcontextStrArray= new String&#91;]{\"\u501f\u9605\"};\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t\t\/\/ TODO: handle exception\n\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif(getSelectionIndices().length==1) {\n\t\t\t\t\t\t\tString isbn=getSelection()&#91;0].getText(0);\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tResultSet stateResultSet=statement.executeQuery(\"select * from states where userAccount='\"+newAccount+\"' and isbn='\"+isbn+\"'\");\n\t\t\t\t\t\t\t\tif(stateResultSet.next() &amp;amp;&amp;amp; Integer.parseInt(stateResultSet.getString(8))>0) {\/\/\u5982\u679c\u6709\u672a\u8fd8\u7684\u4e66\n\t\t\t\t\t\t\t\t\tResultSet bookResultSet=statement.executeQuery(\"select * from books where isbn='\"+isbn+\"'\");\n\t\t\t\t\t\t\t\t\tbookResultSet.next();\n\t\t\t\t\t\t\t\t\tcontextStrArray= new String&#91;]{\"\u5f52\u8fd8\"};\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}catch (Exception e) {\n\t\t\t\t\t\t\t\t\/\/ TODO: handle exception\n\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t}}}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"users\":\n\t\t\t\t\tif(newRole==\"\u9ad8\u7ea7\u7ba1\u7406\u5458\") {\n\t\t\t\t\t\tif(getSelectionIndices().length==1)\n\t\t\t\t\t\t\tcontextStrArray= new String&#91;]{\"\u4fee\u6539\",\"\u5220\u9664\"};\n\t\t\t\t\t\tif(getSelectionIndices().length>1)\n\t\t\t\t\t\t\tcontextStrArray= new String&#91;]{\"\u5220\u9664\"};\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"states\":\n\t\t\t\t\tif(getSelectionIndices().length==1)\n\t\t\t\t\t\tcontextStrArray= new String&#91;]{\"\u8be6\u60c5...\"};\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"mystates\":\n\t\t\t\t\tif(getSelectionIndices().length==1)\n\t\t\t\t\t\tcontextStrArray= new String&#91;]{\"\u8be6\u60c5...\"};\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"records\":\n\t\t\t\t\t\/\/if(getSelectionIndices().length==1)\n\t\t\t\t\t\t\/\/contextStrArray= new String&#91;]{\"\u8be6\u60c5...\"};\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\n\t\t\t\tMenu menu=new Menu(shell,SWT.POP_UP);\n\t\t\t\tsetMenu(menu);\n\t\t\t\tfor(String contextStr:contextStrArray) {\n\t\t\t\t\tMenuItem menuItem=new MenuItem(menu, SWT.PUSH);\n\t\t\t\t\tmenuItem.setText(contextStr);\n\t\t\t\t\tmenuItem.addListener(SWT.Selection, new Listener() {\t\t\t\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void handleEvent(Event arg0){\n\t\t\t\t\t\t\t\/\/ TODO Auto-generated method stub\n\t\t\t\t\t\t\tTableItem selectedTableItem=getSelection()&#91;0];\n\t\t\t\t\t\t\tString userName=\"\";\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tResultSet resultSet=statement.executeQuery(\"select userName from users where userAccount='\"+newAccount+\"'\");\n\t\t\t\t\t\t\t\tresultSet.next();\n\t\t\t\t\t\t\t\tuserName=resultSet.getString(1);\n\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t\/\/ TODO: handle exception\n\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tswitch (contextStr) {\n\t\t\t\t\t\t\t\tcase \"\u5220\u9664\": {\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tint&#91;] selectionIndices=getSelectionIndices();\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif(tableName.equals(\"books\")) {\n\t\t\t\t\t\t\t\t\t\tfor(int i:selectionIndices) {\n\t\t\t\t\t\t\t\t\t\t\tTableItem item=getItem(i);\n\t\t\t\t\t\t\t\t\t\t\tstatement.execute(\"delete from books where isbn='\"+item.getText()+\"'\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif(tableName.equals(\"users\")) {\n\t\t\t\t\t\t\t\t\t\tfor(int i:selectionIndices) {\n\t\t\t\t\t\t\t\t\t\t\tTableItem item=getItem(i);\n\t\t\t\t\t\t\t\t\t\t\tstatement.execute(\"delete from users where userAccount='\"+item.getText()+\"'\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tremove(selectionIndices);\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase \"\u4fee\u6539\":{\n\t\t\t\t\t\t\t\t\tif(tableName.equals(\"books\")) {\n\t\t\t\t\t\t\t\t\t\tString&#91;] defaultValuesArray= {selectedTableItem.getText(0),selectedTableItem.getText(1),selectedTableItem.getText(2),selectedTableItem.getText(3),selectedTableItem.getText(4),selectedTableItem.getText(5),selectedTableItem.getText(6),selectedTableItem.getText(10),selectedTableItem.getText(9)};\n\t\t\t\t\t\t\t\t\t\tBoolean&#91;] editAllowedArray= {false,true,true,true,true,true,true,true,true};\n\t\t\t\t\t\t\t\t\t\t\/\/new OperationPanel(\"\",\"\",\"\u4fee\u6539\",\"\u4e66\u7c4d\",\"\u5c06\u4f1a\u6839\u636eISBN\u4fee\u6539\u4e66\u7c4d\u4fe1\u606f\",new String&#91;] {\"ISBN\",\"\u4e66\u540d\",\"\u4f5c\u8005\",\"\u7c7b\u578b\",\"\u51fa\u7248\u793e\",\"\u51fa\u7248\u65e5\u671f\",\"\u5165\u5e93\u6570\u91cf\",\"\u5165\u5e93\u65e5\u671f\",\"\u72b6\u6001\"},new String&#91;] {},new Boolean&#91;] {},statement);\n\t\t\t\t\t\t\t\t\t\t\/\/                                           tableHeadersStrArray=new String&#91;] {\"ISBN\",\"\u4e66\u540d\",\"\u4f5c\u8005\",\"\u7c7b\u578b\",\"\u51fa\u7248\u793e\",\"\u51fa\u7248\u65e5\u671f\",\"\u9986\u85cf\u6570\u91cf\",\"\u501f\u51fa\u6570\u91cf\",\"\u672a\u501f\u51fa\u6570\u91cf\",\"\u72b6\u6001\",\"\u6dfb\u52a0\u65e5\u671f\"};\n\t\t\t\t\t\t\t\t\t\tOperationPanel modifyBooksOperationPanel=new OperationPanel(\"\",\"\",\"\u4fee\u6539\",\"\u4e66\u7c4d\",\"\u5c06\u4f1a\u6839\u636eISBN\u4fee\u6539\u4e66\u7c4d\u4fe1\u606f\",new String&#91;] {\"ISBN\",\"\u4e66\u540d\",\"\u4f5c\u8005\",\"\u7c7b\u578b\",\"\u51fa\u7248\u793e\",\"\u51fa\u7248\u65e5\u671f\",\"\u5165\u5e93\u6570\u91cf\",\"\u5165\u5e93\u65e5\u671f\",\"\u72b6\u6001\"},defaultValuesArray,editAllowedArray, statement);\n\t\t\t\t\t\t\t\t\t\tmodifyBooksOperationPanel.main(null);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif(tableName.equals(\"users\")) {\n\t\t\t\t\t\t\t\t\t\t\/\/tableHeadersStrArray=new String&#91;] {\"\u7528\u6237\u540d\",\"\u59d3\u540d\",\"\u5bc6\u7801\",\"\u8eab\u4efd\",\"\u72b6\u6001\",\"\u6dfb\u52a0\u65e5\u671f\"};\n\t\t\t\t\t\t\t\t\t\tString&#91;] defaultValuesArray= {selectedTableItem.getText(0),selectedTableItem.getText(1),selectedTableItem.getText(2),selectedTableItem.getText(3),selectedTableItem.getText(5),selectedTableItem.getText(4)};\n\t\t\t\t\t\t\t\t\t\tBoolean&#91;] editAllowedArray= {false,true,true,true,true,true};\n\t\t\t\t\t\t\t\t\t\tOperationPanel modifyUsersOperationPanel=new OperationPanel(\"\",\"\", \"\u4fee\u6539\",\"\u7528\u6237\",\"\u5c06\u4f1a\u6839\u636e\u7528\u6237\u540d\u4fee\u6539\u7528\u6237\u4fe1\u606f\",new String&#91;] {\"\u7528\u6237\u540d\",\"\u59d3\u540d\",\"\u5bc6\u7801\",\"\u8eab\u4efd\u7c7b\u578b\",\"\u6dfb\u52a0\u65e5\u671f\",\"\u72b6\u6001\"},defaultValuesArray,editAllowedArray ,statement);\n\t\t\t\t\t\t\t\t\t\tmodifyUsersOperationPanel.main(null);\n\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase \"\u501f\u9605\":{\n\t\t\t\t\t\t\t\t\tString&#91;] defaultValuesArray= {selectedTableItem.getText(0),selectedTableItem.getText(1),selectedTableItem.getText(2),selectedTableItem.getText(3),selectedTableItem.getText(4),selectedTableItem.getText(5),\"1\",new SimpleDateFormat(\"yyyy-MM-dd\").format(new Date()) };\n\t\t\t\t\t\t\t\t\tBoolean&#91;] editAllowedArray= {false,false,false,false,false,false,true,false};\n\t\t\t\t\t\t\t\t\tOperationPanel borrowBooksOperationPanel=new OperationPanel(newAccount,userName,\"\u501f\u9605\",\"\u4e66\u7c4d\",\"\u8bf7\u8f93\u5165\u501f\u9605\u6570\u91cf\",new String&#91;] {\"ISBN\",\"\u4e66\u540d\",\"\u4f5c\u8005\",\"\u7c7b\u578b\",\"\u51fa\u7248\u793e\",\"\u51fa\u7248\u65e5\u671f\",\"\u501f\u9605\u6570\u91cf\",\"\u501f\u9605\u65e5\u671f\"},defaultValuesArray,editAllowedArray, statement);\n\t\t\t\t\t\t\t\t\tborrowBooksOperationPanel.main(null);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase \"\u5f52\u8fd8\":{\n\t\t\t\t\t\t\t\t\tString isbn=selectedTableItem.getText(0);\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tResultSet resultSet=statement.executeQuery(\"select unReturnedCount from states where isbn='\"+isbn+\"' and userAccount='\"+newAccount+\"'\");\n\t\t\t\t\t\t\t\t\tString returnCountStr=\"1\";\n\t\t\t\t\t\t\t\t\tif(resultSet.next())\n\t\t\t\t\t\t\t\t\t\treturnCountStr=resultSet.getString(1);\n\t\t\t\t\t\t\t\t\tString&#91;] defaultValuesArray= {selectedTableItem.getText(0),selectedTableItem.getText(1),selectedTableItem.getText(2),selectedTableItem.getText(3),selectedTableItem.getText(4),selectedTableItem.getText(5),returnCountStr,new SimpleDateFormat(\"yyyy-MM-dd\").format(new Date()) };\n\t\t\t\t\t\t\t\t\tBoolean&#91;] editAllowedArray= {false,false,false,false,false,false,true,false};\n\t\t\t\t\t\t\t\t\tOperationPanel returnBooksOperationPanel=new OperationPanel(newAccount,userName,\"\u5f52\u8fd8\",\"\u4e66\u7c4d\",\"\u8bf7\u8f93\u5165\u5f52\u8fd8\u6570\u91cf\",new String&#91;] {\"ISBN\",\"\u4e66\u540d\",\"\u4f5c\u8005\",\"\u7c7b\u578b\",\"\u51fa\u7248\u793e\",\"\u51fa\u7248\u65e5\u671f\",\"\u5f52\u8fd8\u6570\u91cf\",\"\u5f52\u8fd8\u65e5\u671f\"},defaultValuesArray,editAllowedArray, statement);\n\t\t\t\t\t\t\t\t\treturnBooksOperationPanel.main(null);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase \"\u8be6\u60c5...\":\n\t\t\t\t\t\t\t\t\tString accountToSearch=selectedTableItem.getText(0);\n\t\t\t\t\t\t\t\t\tString isbnToSearch=selectedTableItem.getText(2);\n\t\t\t\t\t\t\t\t\t\/\/SearchUI\u7c7b\u7684newRole\u8fd9\u91cc\u4f20\u9012isbn,\u4ec5\u5f53\u67e5\u770b\u8be6\u60c5\u65f6\u624d\u4f1a\u7528\u5230\n\t\t\t\t\t\t\t\t\tSearchUI searchRecordUI=new SearchUI(accountToSearch,isbnToSearch,\"\u501f\u9605\u8bb0\u5f55\u8be6\u60c5\",new String&#91;] {\"\u64cd\u4f5c\u7c7b\u578b\"} , statement);\n\t\t\t\t\t\t\t\t\tsearchRecordUI.main(null);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t\/\/ TODO: handle exception\n\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\/\/contextStrArray= new String&#91;]{};\n\t\t\t\t\t});\n\t\t\t\tcontextStrArray=new String&#91;] {};\n\t\t\t\t}\n\t\t\t\t\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\n\t\t\t}\t\t\t\n\t\t\t@Override\n\t\t\tpublic void widgetDefaultSelected(SelectionEvent arg0) {\n\t\t\t\t\/\/ TODO Auto-generated method stub\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t}\n\t\tpublic static void main() {\n\t\tDisplay display = Display.getDefault();\n\t\t\/\/Shell shell=new Shell();\n\t\tExtendedTable table = new ExtendedTable(shell,0);\n\t\tshell.open();\n\t\tshell.layout();\n\t\twhile (!shell.isDisposed()) {\n\t\t\tif (!display.readAndDispatch()) {\n\t\t\t\tdisplay.sleep();\n\t\t\t}\n\t\t}\t\n\t}\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u5bf9\u8bdd\u6846OperationPanel<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">OperationPanel.java:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<pre class=\"language-sql wp-block-code\"><code class=\"language-sql\">import org.eclipse.swt.widgets.Button;\nimport org.eclipse.swt.widgets.Combo;\nimport org.eclipse.swt.widgets.DateTime;\nimport org.eclipse.swt.widgets.Dialog;\nimport org.eclipse.swt.widgets.Display;\nimport org.eclipse.swt.widgets.Label;\nimport org.eclipse.swt.widgets.List;\nimport org.eclipse.swt.widgets.MessageBox;\nimport org.eclipse.swt.widgets.Shell;\nimport org.eclipse.swt.widgets.Text;\nimport com.ibm.icu.text.PersonNameFormatter.Length;\nimport java.sql.ResultSet;\nimport java.sql.Statement;\nimport java.util.ArrayList;\nimport org.eclipse.swt.SWT;\nimport org.eclipse.swt.events.SelectionAdapter;\nimport org.eclipse.swt.events.SelectionEvent;\npublic class OperationPanel {\n\tprotected Shell shell;\n\tstatic String operationStr=\"\";\n\tstatic String objectStr=\"\";\n\tstatic String tipStr=\"\";\n\tstatic String&#91;] labelStrArray= {};\n\tstatic Statement statement=null;\n\tString&#91;] args= {};\n\tstatic String account=\"\";\n\tstatic String userName=\"\";\n\tstatic String&#91;] defaultValuesArray=null;\/\/= {};\n\tstatic Boolean&#91;] editAllowedArray=null;\/\/ {};\n\t\/**\n\t * Launch the application.\n\t * @param args\n\t *\/\n\tpublic OperationPanel() {\n\t\t\/\/ TODO Auto-generated constructor stub\n\t}\n\tpublic OperationPanel(String newAccount,String newUserName, String newOperationStr,String newObjectStr ,String newTipStr,String&#91;] newLabelStrArray,String&#91;] newDefaultValuesArray,Boolean&#91;]newEditAllowedArray, Statement newStatement) {\n\t\taccount=newAccount;\n\t\tuserName=newUserName;\n\t\toperationStr=newOperationStr;\n\t\tobjectStr=newObjectStr;\n\t\ttipStr=newTipStr;\n\t\tlabelStrArray=newLabelStrArray;\n\t\tdefaultValuesArray=newDefaultValuesArray;\n\t\teditAllowedArray=newEditAllowedArray;\n\t\tstatement=newStatement;\n\t}\n\tpublic OperationPanel(String&#91;] operation_object_LabelStrArray) { \/\/\n\t\t\/\/ TODO Auto-generated constructor stub\n\t\toperationStr=operation_object_LabelStrArray&#91;0];\n\t\tobjectStr=operation_object_LabelStrArray&#91;1];\n\t}\n\tpublic static void main(String&#91;] newArgs) {\n\t\ttry {\n\t\t\tOperationPanel window = new OperationPanel(account,userName, operationStr,objectStr,tipStr,labelStrArray,defaultValuesArray,editAllowedArray, statement);\n\t\t\t\/\/OperationPanel window = new OperationPanel(\"\u6dfb\u52a0\",\"\u4e66\u7c4d\",new String&#91;] {\"ISBN\",\"\u4e66\u540d\",\"\u4f5c\u8005\",\"\u7c7b\u578b\",\"\u51fa\u7248\u793e\",\"\u51fa\u7248\u65e5\u671f\",\"\u5165\u5e93\u6570\u91cf\"});\n\t\t\t\/\/\tnewArgs=new String&#91;] {\"\u6dfb\u52a0\",\"\u4e66\u7c4d\",\"ISBN\",\"\u4e66\u540d\",\"\u4f5c\u8005\",\"\u7c7b\u578b\",\"\u51fa\u7248\u793e\",\"\u51fa\u7248\u65e5\u671f\",\"\u5165\u5e93\u6570\u91cf\"};\n\t\t\t\/\/OperationPanel window = new OperationPanel(new String&#91;] {\"\u6dfb\u52a0\",\"\u4e66\u7c4d\",\"ISBN\",\"\u4e66\u540d\",\"\u4f5c\u8005\",\"\u7c7b\u578b\",\"\u51fa\u7248\u793e\",\"\u51fa\u7248\u65e5\u671f\",\"\u5165\u5e93\u6570\u91cf\"});\n\t\t\twindow.open();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}\n\t\/**\n\t * Open the window.\n\t *\/\n\tpublic void open() {\n\t\tDisplay display = Display.getDefault();\n\t\tcreateContents();\n\t\tshell.open();\n\t\tshell.layout();\n\t\twhile (!shell.isDisposed()) {\n\t\t\tif (!display.readAndDispatch()) {\n\t\t\t\tdisplay.sleep();\n\t\t\t}\n\t\t}\n\t}\n\t\/**\n\t * Create contents of the window.\n\t *\/\n\tprotected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(450, 300);\n\t\tshell.setText(operationStr+objectStr);\n\t\tshell.setBounds(600, 300, 270, labelStrArray.length * 25 + 120);\n\t\tshell.setMaximumSize(270, labelStrArray.length * 25 + 120);\n\t\tint i;\n\t\t\/\/Text&#91;] testArray=new Text&#91;]\n\t\tLabel tipLabel=new Label(shell, 0);\n\t\ttipLabel.setBounds(10,10,200,20);\n\t\ttipLabel.setText(tipStr);\n\t\tArrayList&amp;lt;Text> textArrayList=new ArrayList();\n\t\tArrayList&amp;lt;DateTime> dateArrayList=new ArrayList();\n\t\tArrayList&amp;lt;Combo> comboArrayList=new ArrayList&amp;lt;Combo>();\n\t\tfor (i = 0; i &amp;lt; labelStrArray.length; i++) {\n\t\t\tLabel label = new Label(shell, 0);\n\t\t\tif(!operationStr.equals(\"\u8bbe\u7f6e\"))\n\t\t\t\tlabel.setBounds(10, 25 * i + 40, 60, 20);\n\t\t\telse\n\t\t\t\tlabel.setBounds(10, 25 * i + 40, 100, 20);\n\t\t\tlabel.setText(labelStrArray&#91;i]);\n\t\t\tif (labelStrArray&#91;i].indexOf(\"\u65e5\u671f\") != -1) {\n\t\t\t\tDateTime dateTime = new DateTime(shell, 0);\n\t\t\t\t\/\/dateTime.get\n\t\t\t\t\/\/System.out.println(dateTime.getMonth());\n\t\t\t\tdateTime.setBounds(80, 25 * i + 40, 150, 20);\n\t\t\t\tdateArrayList.add(dateTime);\n\t\t\t\ttextArrayList.add(null);\n\t\t\t\tcomboArrayList.add(null);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif(labelStrArray&#91;i].indexOf(\"\u7c7b\u578b\") != -1 || labelStrArray&#91;i].indexOf(\"\u72b6\u6001\") != -1) {\n\t\t\t\t\tCombo combo=new Combo(shell, 0);\n\t\t\t\t\tcombo.setBounds(80, 25 * i + 40, 150, 20);\n\t\t\t\t\tif(objectStr==\"\u4e66\u7c4d\") {\n\t\t\t\t\t\tif(labelStrArray&#91;i].indexOf(\"\u7c7b\u578b\") != -1) {\n\t\t\t\t\t\t\tcombo.setItems(new String&#91;]{\"\u6587\u5b66\",\"\u54f2\u5b66\",\"\u81ea\u7136\u79d1\u5b66\",\"\u793e\u4f1a\u79d1\u5b66\",\"\u6570\u5b66\",\"\u5386\u53f2\",\"\u5de5\u4e1a\u6280\u672f\",\"\u4fe1\u606f\u6280\u672f\",\"\u5176\u4ed6\"});\n\t\t\t\t\t\t\tcombo.select(0);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tcombo.setItems(new String&#91;]{\"\u6b63\u5e38\",\"\u51bb\u7ed3\"});\n\t\t\t\t\t\t\tcombo.select(0);\n\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\tif(objectStr==\"\u7528\u6237\") {\n\t\t\t\t\t\tif(labelStrArray&#91;i].indexOf(\"\u7c7b\u578b\") != -1) {\n\t\t\t\t\t\t\tcombo.setItems(new String&#91;]{\"\u666e\u901a\u7528\u6237\",\"\u666e\u901a\u7ba1\u7406\u5458\",\"\u9ad8\u7ea7\u7ba1\u7406\u5458\"});\n\t\t\t\t\t\t\tcombo.select(0);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tcombo.setItems(new String&#91;]{\"\u6b63\u5e38\",\"\u51bb\u7ed3\"});\n\t\t\t\t\t\t\tcombo.select(0);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\tdateArrayList.add(null);\n\t\t\t\t\ttextArrayList.add(null);\n\t\t\t\t\tcomboArrayList.add(combo);\n\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tText text = new Text(shell, 0);\n\t\t\t\t\tif(!operationStr.equals(\"\u8bbe\u7f6e\"))\n\t\t\t\t\t\ttext.setBounds(80, 25 * i + 40, 150, 20);\n\t\t\t\t\telse\n\t\t\t\t\t\ttext.setBounds(120, 25 * i + 40, 100, 20);\n\t\t\t\t\ttextArrayList.add(text);\n\t\t\t\t\tdateArrayList.add(null);\n\t\t\t\t\tcomboArrayList.add(null);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\/\/\u9700\u5728\u6b64\u5904\u7f6e\u9ed8\u8ba4\u503c\n\t\tif(defaultValuesArray.length!=0)\n\t\t\tfor(i=0;i&amp;lt;textArrayList.size();i++) {\n\t\t\t\t\/\/System.out.println(i);\n\t\t\t\t\/\/System.out.println(defaultValuesArray&#91;i]);\n\t\t\t\tif(textArrayList.get(i)!=null) {\n\t\t\t\t\ttextArrayList.get(i).setText(defaultValuesArray&#91;i]);\n\t\t\t\t\ttextArrayList.get(i).setEditable(editAllowedArray&#91;i]);\n\t\t\t\t}\t\t\t\t\n\t\t\t\tif(dateArrayList.get(i)!=null) {\n\t\t\t\t\tdateArrayList.get(i).setDate(Integer.parseInt(defaultValuesArray&#91;i].substring(0, 4)), Integer.parseInt(defaultValuesArray&#91;i].substring(5, 7))-1,Integer.parseInt(defaultValuesArray&#91;i].substring(8, 10)));\n\t\t\t\t\tdateArrayList.get(i).setEnabled(editAllowedArray&#91;i]);\n\t\t\t\t}\n\t\t\t\tif(comboArrayList.get(i)!=null) {\n\t\t\t\t\tcomboArrayList.get(i).setText(defaultValuesArray&#91;i]);\n\t\t\t\t\tcomboArrayList.get(i).setEnabled(editAllowedArray&#91;i]);\n\t\t\t\t}\t\t\t\t\t\t\t\t\t\n\t\t\t}\n\t\tButton okButton = new Button(shell, 0);\n\t\tokButton.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tfor(Text text:textArrayList) {\n\t\t\t\t\tif(text!=null)\n\t\t\t\t\t\tif(text.getText().equals(\"\")) {\n\t\t\t\t\t\t\tMessageBox messageBox=new MessageBox(shell);\n\t\t\t\t\t\t\tmessageBox.setText(\"\u63d0\u793a\");\n\t\t\t\t\t\t\tmessageBox.setMessage(\"\u8bf7\u5c06\u4fe1\u606f\u8865\u5145\u5b8c\u6574!\");\n\t\t\t\t\t\t\tmessageBox.open();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\n\t\t\t\tswitch (operationStr) {\n\t\t\t\tcase \"\u6dfb\u52a0\":{\n\t\t\t\t\tswitch (objectStr) {\n\t\t\t\t\tcase \"\u4e66\u7c4d\":\t\t\t\t\t\t\n\t\t\t\t\t\tString publishDate=String.valueOf(dateArrayList.get(6-1).getYear())+\"-\"+String.format(\"%02d\",dateArrayList.get(6-1).getMonth()+1)+\"-\"+String.format(\"%02d\",dateArrayList.get(6-1).getDay());\n\t\t\t\t\t\tString addDateTime=String.valueOf(dateArrayList.get(7).getYear())+\"-\"+String.format(\"%02d\",dateArrayList.get(7).getMonth()+1)+\"-\"+String.format(\"%02d\",dateArrayList.get(7).getDay());\n\t\t\t\t\t\tSystem.out.println(addDateTime);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tResultSet resultSet=statement.executeQuery(\"select * from books where isbn='\"+textArrayList.get(0).getText()+\"'\");\n\t\t\t\t\t\t\tif (resultSet.next()) {\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tMessageBox messageBox=new MessageBox(shell);\n\t\t\t\t\t\t\t\tmessageBox.setText(\"\u63d0\u793a\");\n\t\t\t\t\t\t\t\tmessageBox.setMessage(\"\u6b64ISBN\u53f7\u7801\u7684\u4e66\u7c4d\u5df2\u5b58\u5728\uff0c\u60a8\u53ea\u80fd\u4fee\u6539\u6216\u5220\u9664\u5b83\uff01\");\n\t\t\t\t\t\t\t\tmessageBox.open();\n\t\t\t\t\t\t\t\tshell.setVisible(false);\n\t\t\t\t\t\t\t\tdefaultValuesArray=new String&#91;] {resultSet.getString(2),resultSet.getString(3),resultSet.getString(4),resultSet.getString(5),resultSet.getString(6),resultSet.getString(7),resultSet.getString(8),resultSet.getString(12),resultSet.getString(11)};\n\t\t\t\t\t\t\t\teditAllowedArray=new Boolean&#91;] {false,true,true,true,true,true,true,true,true};\n\t\t\t\t\t\t\t\t\/\/OperationPanel(String newAccount,String newUserName, String newOperationStr,String newObjectStr ,String newTipStr,String&#91;] newLabelStrArray,String&#91;] newDefaultValuesArray,Boolean&#91;]newEditAllowedArray, Statement newStatement) {\n\t\t\t\t\t\t\t\tOperationPanel modifyBooksOperationPanel=new OperationPanel(account,userName, \"\u4fee\u6539\",\"\u4e66\u7c4d\",\"\u5c06\u4f1a\u6839\u636eISBN\u4fee\u6539\u4e66\u7c4d\u4fe1\u606f\",new String&#91;] {\"ISBN\",\"\u4e66\u540d\",\"\u4f5c\u8005\",\"\u7c7b\u578b\",\"\u51fa\u7248\u793e\",\"\u51fa\u7248\u65e5\u671f\",\"\u5165\u5e93\u6570\u91cf\",\"\u5165\u5e93\u65e5\u671f\",\"\u72b6\u6001\"},defaultValuesArray,editAllowedArray, statement);\/\/\u7528\u4e0d\u5230\u7684\u4fe1\u606f\u4f20\u4e2a\u7a7a\u503c\u4e5f\u884c\n\t\t\t\t\t\t\t\t\/\/OperationPanel addBooksOperationPanel=new OperationPanel();\n\t\t\t\t\t\t\t\tmodifyBooksOperationPanel.main(null);\n\t\t\t\t\t\t\t\tshell.close();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tstatement.execute(\"insert into books(isbn,bookName,author,bookType,publisher,publishDate,totalCount,borrowedCount,unborrowedCount,addBookDate) values('\"+textArrayList.get(1-1).getText()+\"','\"+textArrayList.get(2-1).getText()+\"','\"+textArrayList.get(3-1).getText()+\"','\"+comboArrayList.get(4-1).getText()+\"','\"+textArrayList.get(5-1).getText()+\"','\"+publishDate+\"',\"+textArrayList.get(7-1).getText()+\",0,\"+textArrayList.get(7-1).getText()+\",'\"+addDateTime+\"')\");\n\t\t\t\t\t\t} catch (Exception e2) {\n\t\t\t\t\t\t\t\/\/ TODO: handle exception\n\t\t\t\t\t\t\te2.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"\u7528\u6237\":\n\t\t\t\t\t\tString addUserDateTime=String.valueOf(dateArrayList.get(5-1).getYear())+\"-\"+String.format(\"%02d\",dateArrayList.get(5-1).getMonth()+1)+\"-\"+String.format(\"%02d\",dateArrayList.get(5-1).getDay());\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tResultSet resultSet=statement.executeQuery(\"select * from users where userAccount='\"+textArrayList.get(0).getText()+\"'\");\n\t\t\t\t\t\t\tif (resultSet.next()) {\n\t\t\t\t\t\t\t\tMessageBox messageBox=new MessageBox(shell);\n\t\t\t\t\t\t\t\tmessageBox.setText(\"\u63d0\u793a\");\n\t\t\t\t\t\t\t\tmessageBox.setMessage(\"\u6b64\u7528\u6237\u540d\u7684\u7528\u6237\u5df2\u5b58\u5728\uff0c\u60a8\u53ea\u80fd\u4fee\u6539\u6216\u5220\u9664\u5b83\uff01\");\n\t\t\t\t\t\t\t\tmessageBox.open();\n\t\t\t\t\t\t\t\tshell.setVisible(false);\n\t\t\t\t\t\t\t\tdefaultValuesArray=new String&#91;] {resultSet.getString(2),resultSet.getString(3),resultSet.getString(4),resultSet.getString(5),resultSet.getString(7),resultSet.getString(6)};\n\t\t\t\t\t\t\t\teditAllowedArray=new Boolean&#91;] {false,true,true,true,true,true};\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\/\/OperationPanel(String newAccount,String newUserName, String newOperationStr,String newObjectStr ,String newTipStr,String&#91;] newLabelStrArray,String&#91;] newDefaultValuesArray,Boolean&#91;]newEditAllowedArray, Statement newStatement) {\n\t\t\t\t\t\t\t\tOperationPanel modifyUsersOperationPanel=new OperationPanel(account,userName, \"\u4fee\u6539\",\"\u7528\u6237\",\"\u5c06\u4f1a\u6839\u636e\u7528\u6237\u540d\u4fee\u6539\u7528\u6237\u4fe1\u606f\",new String&#91;] {\"\u7528\u6237\u540d\",\"\u59d3\u540d\",\"\u5bc6\u7801\",\"\u8eab\u4efd\u7c7b\u578b\",\"\u6dfb\u52a0\u65e5\u671f\",\"\u72b6\u6001\"},defaultValuesArray,editAllowedArray, statement);\n\t\t\t\t\t\t\t\tmodifyUsersOperationPanel.main(null);\n\t\t\t\t\t\t\t\tshell.close();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tstatement.execute(\"insert into users(userAccount,userName,userPassword,userRole,addUserDate) values('\"+textArrayList.get(1-1).getText()+\"','\"+textArrayList.get(2-1).getText()+\"','\"+textArrayList.get(3-1).getText()+\"','\"+comboArrayList.get(4-1).getText()+\"','\"+addUserDateTime+\"')\");\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t\t\t\t} catch (Exception e2) {\n\t\t\t\t\t\t\t\/\/ TODO: handle exception\n\t\t\t\t\t\t\te2.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase \"\u5220\u9664\":{\n\t\t\t\t\tswitch (objectStr) {\n\t\t\t\t\tcase \"\u4e66\u7c4d\":\n\t\t\t\t\t\t\/\/String\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tResultSet resultSet=statement.executeQuery(\"select * from books where isbn='\"+textArrayList.get(0).getText()+\"'\");\n\t\t\t\t\t\t\tif (!resultSet.next()) {\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tMessageBox messageBox=new MessageBox(shell);\n\t\t\t\t\t\t\t\tmessageBox.setText(\"\u63d0\u793a\");\n\t\t\t\t\t\t\t\tmessageBox.setMessage(\"\u6b64ISBN\u53f7\u7801\u7684\u4e66\u7c4d\u4e0d\u5b58\u5728\uff01\");\n\t\t\t\t\t\t\t\tmessageBox.open();\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tstatement.execute(\"delete from books where isbn='\"+textArrayList.get(1-1).getText()+\"'\");\n\t\t\t\t\t\t} catch (Exception e2) {\n\t\t\t\t\t\t\t\/\/ TODO: handle exception\n\t\t\t\t\t\t\te2.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"\u7528\u6237\":\t\t\t\t\t\t\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tResultSet resultSet=statement.executeQuery(\"select * from users where userAccount='\"+textArrayList.get(0).getText()+\"'\");\n\t\t\t\t\t\t\tif (!resultSet.next()) {\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tMessageBox messageBox=new MessageBox(shell);\n\t\t\t\t\t\t\t\tmessageBox.setText(\"\u63d0\u793a\");\n\t\t\t\t\t\t\t\tmessageBox.setMessage(\"\u6b64\u7528\u6237\u540d\u4e0d\u5b58\u5728\uff01\");\n\t\t\t\t\t\t\t\tmessageBox.open();\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tstatement.execute(\"delete from users where userAccount='\"+textArrayList.get(1-1).getText()+\"')\");\n\t\t\t\t\t\t} catch (Exception e2) {\n\t\t\t\t\t\t\t\/\/ TODO: handle exception\n\t\t\t\t\t\t\te2.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase \"\u4fee\u6539\":{\n\t\t\t\t\tswitch (objectStr) {\n\t\t\t\t\tcase \"\u4e66\u7c4d\":\n\t\t\t\t\t\tString publishDate=String.valueOf(dateArrayList.get(6-1).getYear())+\"-\"+String.format(\"%02d\",dateArrayList.get(6-1).getMonth()+1)+\"-\"+String.format(\"%02d\",dateArrayList.get(6-1).getDay());\n\t\t\t\t\t\tString addDateTime=String.valueOf(dateArrayList.get(7).getYear())+\"-\"+String.format(\"%02d\",dateArrayList.get(7).getMonth()+1)+\"-\"+String.format(\"%02d\",dateArrayList.get(7).getDay());\n\t\t\t\t\t\t\/\/int unborrowedCount=Integer.parseInt(textArrayList.get(7).getText());\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tResultSet resultSet=statement.executeQuery(\"select borrowedCount from books where isbn='\"+textArrayList.get(0).getText()+\"'\");\n\t\t\t\t\t\t\tif(!resultSet.next()) {\n\t\t\t\t\t\t\t\tMessageBox messageBox=new MessageBox(shell);\n\t\t\t\t\t\t\t\tmessageBox.setText(\"\u63d0\u793a\");\n\t\t\t\t\t\t\t\tmessageBox.setMessage(\"\u672a\u627e\u5230\u6b64ISBN\u53f7\u7801\u7684\u4e66\u7c4d\uff0c\u8bf7\u66f4\u6539\u540e\u91cd\u8bd5!\");\n\t\t\t\t\t\t\t\tmessageBox.open();\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tint borrowedCount=Integer.parseInt(resultSet.getString(1));\n\t\t\t\t\t\t\t\tint unborrowedCount=Integer.parseInt(textArrayList.get(7-1).getText())-borrowedCount;\n\t\t\t\t\t\t\t\tstatement.execute(\"update books set bookName='\"+textArrayList.get(2-1).getText()+\"',author='\"+textArrayList.get(3-1).getText()+\"',bookType='\"+comboArrayList.get(4-1).getText()+\"',publisher='\"+textArrayList.get(5-1).getText()+\"',publishDate='\"+publishDate+\"',totalCount=\"+textArrayList.get(7-1).getText()+\",unborrowedCount=\"+unborrowedCount+\",addBookDate='\"+addDateTime+\"',bookState='\"+comboArrayList.get(8).getText()+\"' where isbn='\"+textArrayList.get(0).getText()+\"'\");\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\/\/resultSet.next();\n\t\t\t\t\t\t\t} catch (Exception e2) {\n\t\t\t\t\t\t\t\/\/ TODO: handle exception\n\t\t\t\t\t\t\te2.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"\u7528\u6237\":\n\t\t\t\t\t\tString addUserDateTime=String.valueOf(dateArrayList.get(5-1).getYear())+\"-\"+String.format(\"%02d\",dateArrayList.get(5-1).getMonth()+1)+\"-\"+String.format(\"%02d\",dateArrayList.get(5-1).getDay());\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tResultSet resultSet=statement.executeQuery(\"select * from users where userAccount='\"+textArrayList.get(0).getText()+\"'\");\n\t\t\t\t\t\t\tif(!resultSet.next()) {\n\t\t\t\t\t\t\t\tMessageBox messageBox=new MessageBox(shell);\n\t\t\t\t\t\t\t\tmessageBox.setText(\"\u63d0\u793a\");\n\t\t\t\t\t\t\t\tmessageBox.setMessage(\"\u672a\u627e\u5230\u6b64\u7528\u6237\uff0c\u8bf7\u66f4\u6539\u540e\u91cd\u8bd5!\");\n\t\t\t\t\t\t\t\tmessageBox.open();\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\/\/System.out.println(comboArrayList.get(5).getText());\n\t\t\t\t\t\t\t\t\/\/System.out.println(account);\n\t\t\t\t\t\t\t\tstatement.execute(\"update users set userName='\"+textArrayList.get(1).getText()+\"',userPassword='\"+textArrayList.get(2).getText()+\"',userRole='\"+comboArrayList.get(3).getText()+\"',addUserDate='\"+addUserDateTime+\"',userState='\"+comboArrayList.get(5).getText()+\"' where userAccount='\"+textArrayList.get(0).getText()+\"'\");\n\t\t\t\t\t\t\t\t\/\/System.out.println(\"changed\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t} catch (Exception e2) {\n\t\t\t\t\t\t\t\/\/ TODO: handle exception\n\t\t\t\t\t\t\te2.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\tcase \"\u501f\u9605\":{\n\t\t\t\t\t\/\/int unborrowedCount=0;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tResultSet resultSet=statement.executeQuery(\"select unReturnedCount from states where userAccount='\"+account+\"' and unReturnedCount>0\");\n\t\t\t\t\t\tint unReturnedCountSum=0;\n\t\t\t\t\t\twhile(resultSet.next()) {\n\t\t\t\t\t\t\tunReturnedCountSum+=Integer.parseInt(resultSet.getString(1));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tresultSet=statement.executeQuery(\"select maxAllowedTotalBorrowCount,maxAllowedSingleBorrowCount from settings\");\n\t\t\t\t\t\tresultSet.next();\n\t\t\t\t\t\tint maxAllowedTotalBorrowCount=Integer.parseInt(resultSet.getString(1));\n\t\t\t\t\t\tint maxAllowedSingleBorrowCount=Integer.parseInt(resultSet.getString(2));\n\t\t\t\t\t\tif(unReturnedCountSum&amp;lt;maxAllowedTotalBorrowCount) {\n\t\t\t\t\t\t\tif(textArrayList.get(6).getText().matches(\"\\d+\") &amp;amp;&amp;amp; Integer.parseInt(textArrayList.get(6).getText())>0) {\n\t\t\t\t\t\t\t\tint borrowCount=Integer.parseInt(textArrayList.get(6).getText());\n\t\t\t\t\t\t\t\tif(unReturnedCountSum+borrowCount&amp;lt;=maxAllowedTotalBorrowCount) {\n\t\t\t\t\t\t\t\t\tif(borrowCount&amp;lt;=maxAllowedSingleBorrowCount) {\n\t\t\t\t\t\t\t\t\t\tresultSet=statement.executeQuery(\"select borrowedCount,unborrowedCount,bookState from books where isbn='\"+textArrayList.get(0).getText()+\"'\");\n\t\t\t\t\t\t\t\t\t\tresultSet.next();\n\t\t\t\t\t\t\t\t\t\tint allowedBorrowCount=Integer.parseInt(resultSet.getString(2));\n\t\t\t\t\t\t\t\t\t\tint borrowedCount=Integer.parseInt(resultSet.getString(1));\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif(resultSet.getString(3).equals(\"\u6b63\u5e38\")) {\n\t\t\t\t\t\t\t\t\t\t\tif(allowedBorrowCount>=borrowCount){\n\t\t\t\t\t\t\t\t\t\t\t\tString isbn=textArrayList.get(0).getText();\n\t\t\t\t\t\t\t\t\t\t\t\tString bookName=textArrayList.get(1).getText();\n\t\t\t\t\t\t\t\t\t\t\t\tString year=String.valueOf(dateArrayList.get(7).getYear());\n\t\t\t\t\t\t\t\t\t\t\t\tString month=String.format(\"%02d\",dateArrayList.get(7).getMonth()+1);\n\t\t\t\t\t\t\t\t\t\t\t\tString day=String.format(\"%02d\",dateArrayList.get(7).getDay());\n\t\t\t\t\t\t\t\t\t\t\t\tString hour=String.format(\"%02d\",dateArrayList.get(7).getHours());\n\t\t\t\t\t\t\t\t\t\t\t\tString minute=String.format(\"%02d\",dateArrayList.get(7).getMinutes());\n\t\t\t\t\t\t\t\t\t\t\t\tString second=String.format(\"%02d\",dateArrayList.get(7).getSeconds());\n\t\t\t\t\t\t\t\t\t\t\t\tString borrowDateTime=year+\"-\"+month+\"-\"+day+\" \"+hour+\":\"+minute+\":\"+second;\n\t\t\t\t\t\t\t\t\t\t\t\tstatement.execute(\"insert into records(operationDateTime,userAccount,userName,isbn,bookName,operationType,operationCount) values('\"+borrowDateTime+\"','\"+account+\"','\"+userName+\"','\"+isbn+\"','\"+bookName+\"','\u501f\u9605',\"+borrowCount+\")\");\n\t\t\t\t\t\t\t\t\t\t\t\tstatement.execute(\"update books set borrowedCount=\"+(borrowCount+borrowedCount)+\",unBorrowedCount=\"+(allowedBorrowCount-borrowCount)+\" where isbn='\"+isbn+\"'\");\n\t\t\t\t\t\t\t\t\t\t\t\tresultSet= statement.executeQuery(\"select * from states where userAccount='\"+account+\"' and isbn='\"+isbn+\"'\");\n\t\t\t\t\t\t\t\t\t\t\t\tif(resultSet.next()) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tint thisUserBorrowedCount=Integer.parseInt(resultSet.getString(6));\n\t\t\t\t\t\t\t\t\t\t\t\t\tint thisUserUnReturnedCount=Integer.parseInt(resultSet.getString(8));\n\t\t\t\t\t\t\t\t\t\t\t\t\tstatement.execute(\"update states set borrowedCount=\"+(thisUserBorrowedCount+borrowCount)+\",unReturnedCount=\"+(thisUserUnReturnedCount+borrowCount)+\" where userAccount='\"+account+\"' and isbn='\"+isbn+\"'\");\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\t\tstatement.execute(\"insert into states(userAccount,userName,isbn,bookName,borrowedCount,returnedCount,unReturnedCount) values('\"+account+\"','\"+userName+\"','\"+isbn+\"','\"+bookName+\"',\"+borrowCount+\",0,\"+borrowCount+\")\");\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\tMessageBox messageBox=new MessageBox(shell,SWT.ICON_INFORMATION|SWT.OK);\n\t\t\t\t\t\t\t\t\t\t\t\tmessageBox.setText(\"\u63d0\u793a\");\n\t\t\t\t\t\t\t\t\t\t\t\tmessageBox.setMessage(\"\u5269\u4f59\"+allowedBorrowCount+\"\u672c\uff0c\u60a8\u6700\u591a\u53ef\u501f\"+allowedBorrowCount+\"\u672c\uff01\");\n\t\t\t\t\t\t\t\t\t\t\t\tmessageBox.open();\n\t\t\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\tMessageBox messageBox=new MessageBox(shell,SWT.ICON_INFORMATION|SWT.OK);\n\t\t\t\t\t\t\t\t\t\t\tmessageBox.setText(\"\u63d0\u793a\");\n\t\t\t\t\t\t\t\t\t\t\tmessageBox.setMessage(\"\u8be5\u4e66\u4e0d\u53ef\u5916\u501f\uff01\");\n\t\t\t\t\t\t\t\t\t\t\tmessageBox.open();\n\t\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\tMessageBox messageBox=new MessageBox(shell,SWT.ICON_INFORMATION|SWT.OK);\n\t\t\t\t\t\t\t\t\t\tmessageBox.setText(\"\u63d0\u793a\");\n\t\t\t\t\t\t\t\t\t\tmessageBox.setMessage(\"\u5355\u672c\u4e66\u6700\u591a\u53ef\u501f\"+maxAllowedSingleBorrowCount+\"\u672c\uff0c\u8bf7\u66f4\u6539\u540e\u91cd\u8bd5\uff01\");\n\t\t\t\t\t\t\t\t\t\tmessageBox.open();\n\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tMessageBox messageBox=new MessageBox(shell,SWT.ICON_INFORMATION|SWT.OK);\n\t\t\t\t\t\t\t\t\tmessageBox.setText(\"\u63d0\u793a\");\n\t\t\t\t\t\t\t\t\tmessageBox.setMessage(\"\u60a8\u5df2\u8d85\u51fa\u6700\u5927\u53ef\u501f\u6570\u91cf\uff0c\u8bf7\u66f4\u6539\u540e\u91cd\u8bd5\uff01\");\n\t\t\t\t\t\t\t\t\tmessageBox.open();\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tMessageBox messageBox=new MessageBox(shell,SWT.ICON_INFORMATION|SWT.OK);\n\t\t\t\t\t\t\t\tmessageBox.setText(\"\u63d0\u793a\");\n\t\t\t\t\t\t\t\tmessageBox.setMessage(\"\u501f\u9605\u6570\u91cf\u8bf7\u8f93\u5165\u5927\u4e8e0\u7684\u6574\u6570\uff01\");\n\t\t\t\t\t\t\t\tmessageBox.open();\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tMessageBox messageBox=new MessageBox(shell,SWT.ICON_INFORMATION|SWT.OK);\n\t\t\t\t\t\t\tmessageBox.setText(\"\u63d0\u793a\");\n\t\t\t\t\t\t\tmessageBox.setMessage(\"\u60a8\u6709\"+unReturnedCountSum+\"\u672c\u4e66\u672a\u5f52\u8fd8\uff0c\u8bf7\u5148\u5f52\u8fd8\u518d\u501f\uff01\");\n\t\t\t\t\t\t\tmessageBox.open();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t} catch (Exception e2) {\n\t\t\t\t\t\t\/\/ TODO: handle exception\n\t\t\t\t\t\te2.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\tcase \"\u5f52\u8fd8\":{\n\t\t\t\t\ttry {\t\t\t\t\t\t\n\t\t\t\t\t\tif(textArrayList.get(6).getText().matches(\"\\d+\") &amp;amp;&amp;amp; Integer.parseInt(textArrayList.get(6).getText())>0) {\n\t\t\t\t\t\t\tint returnCount=Integer.parseInt(textArrayList.get(6).getText());\n\t\t\t\t\t\t\tString isbn=textArrayList.get(0).getText();\n\t\t\t\t\t\t\tString bookName=textArrayList.get(1).getText();\n\t\t\t\t\t\t\tResultSet resultSet=statement.executeQuery(\"select unReturnedCount from states where isbn='\"+isbn+\"' and userAccount='\"+account+\"'\");\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(resultSet.next()) {\n\t\t\t\t\t\t\t\tint unReturnedCount=Integer.parseInt(resultSet.getString(1));\n\t\t\t\t\t\t\t\tif (returnCount&amp;lt;=unReturnedCount) {\n\t\t\t\t\t\t\t\t\tString year=String.valueOf(dateArrayList.get(7).getYear());\n\t\t\t\t\t\t\t\t\tString month=String.format(\"%02d\",dateArrayList.get(7).getMonth()+1);\n\t\t\t\t\t\t\t\t\tString day=String.format(\"%02d\",dateArrayList.get(7).getDay());\n\t\t\t\t\t\t\t\t\tString hour=String.format(\"%02d\",dateArrayList.get(7).getHours());\n\t\t\t\t\t\t\t\t\tString minute=String.format(\"%02d\",dateArrayList.get(7).getMinutes());\n\t\t\t\t\t\t\t\t\tString second=String.format(\"%02d\",dateArrayList.get(7).getSeconds());\n\t\t\t\t\t\t\t\t\tString returnDateTime=year+\"-\"+month+\"-\"+day+\" \"+hour+\":\"+minute+\":\"+second;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tresultSet=statement.executeQuery(\"select borrowedCount,unBorrowedCount from books where isbn='\"+isbn+\"'\");\n\t\t\t\t\t\t\t\t\tresultSet.next();\n\t\t\t\t\t\t\t\t\tint borrowedCount=Integer.parseInt(resultSet.getString(1));\n\t\t\t\t\t\t\t\t\tint unBorrowedCount=Integer.parseInt(resultSet.getString(2));\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tstatement.execute(\"insert into records(operationDateTime,userAccount,userName,isbn,bookName,operationType,operationCount) values('\"+returnDateTime+\"','\"+account+\"','\"+userName+\"','\"+isbn+\"','\"+bookName+\"','\u5f52\u8fd8',\"+returnCount+\")\");\n\t\t\t\t\t\t\t\t\tstatement.execute(\"update books set borrowedCount=\"+(borrowedCount-returnCount)+\",unBorrowedCount=\"+(unBorrowedCount+returnCount)+\" where isbn='\"+isbn+\"'\");\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tresultSet= statement.executeQuery(\"select * from states where userAccount='\"+account+\"' and isbn='\"+isbn+\"'\");\n\t\t\t\t\t\t\t\t\t\/\/int thisUserBorrowedCount=Integer.parseInt(resultSet.getString(6));\n\t\t\t\t\t\t\t\t\tresultSet.next();\n\t\t\t\t\t\t\t\t\tint thisUserReturnedCount=Integer.parseInt(resultSet.getString(7));\n\t\t\t\t\t\t\t\t\tint thisUserUnReturnedCount=Integer.parseInt(resultSet.getString(8));\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tstatement.execute(\"update states set returnedCount=\"+(thisUserReturnedCount+returnCount)+\",unReturnedCount=\"+(thisUserUnReturnedCount-returnCount)+\" where userAccount='\"+account+\"' and isbn='\"+isbn+\"'\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tif(unReturnedCount!=0) {\n\t\t\t\t\t\t\t\t\t\tMessageBox messageBox=new MessageBox(shell,SWT.ICON_INFORMATION|SWT.OK);\n\t\t\t\t\t\t\t\t\t\tmessageBox.setText(\"\u63d0\u793a\");\n\t\t\t\t\t\t\t\t\t\tmessageBox.setMessage(\"\u60a8\u5f53\u524d\u53ea\u501f\u4e86\"+unReturnedCount+\"\u672c\u6b64\u4e66\uff0c\u5f52\u8fd8\u6570\u91cf\u4e0d\u5f97\u5927\u4e8e\"+unReturnedCount+\"!\");\n\t\t\t\t\t\t\t\t\t\tmessageBox.open();\n\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\tMessageBox messageBox=new MessageBox(shell,SWT.ICON_INFORMATION|SWT.OK);\n\t\t\t\t\t\t\t\t\t\tmessageBox.setText(\"\u63d0\u793a\");\n\t\t\t\t\t\t\t\t\t\tmessageBox.setMessage(\"\u60a8\u5f53\u524d\u6ca1\u6709\u501f\u6b64\u4e66!\");\n\t\t\t\t\t\t\t\t\t\tmessageBox.open();\n\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tMessageBox messageBox=new MessageBox(shell,SWT.ICON_INFORMATION|SWT.OK);\n\t\t\t\t\t\t\t\tmessageBox.setText(\"\u63d0\u793a\");\n\t\t\t\t\t\t\t\tmessageBox.setMessage(\"\u60a8\u5f53\u524d\u6ca1\u6709\u501f\u6b64\u4e66\uff01\");\n\t\t\t\t\t\t\t\tmessageBox.open();\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tMessageBox messageBox=new MessageBox(shell,SWT.ICON_INFORMATION|SWT.OK);\n\t\t\t\t\t\t\tmessageBox.setText(\"\u63d0\u793a\");\n\t\t\t\t\t\t\tmessageBox.setMessage(\"\u5f52\u8fd8\u6570\u91cf\u8bf7\u8f93\u5165\u5927\u4e8e0\u7684\u6574\u6570\uff01\");\n\t\t\t\t\t\t\tmessageBox.open();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t} catch (Exception e2) {\n\t\t\t\t\t\t\/\/ TODO: handle exception\n\t\t\t\t\t\te2.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\tcase \"\u8bbe\u7f6e\":\t\t\t\t\t\n\t\t\t\t\tif(textArrayList.get(0).getText().matches(\"\\d+\") &amp;amp;&amp;amp; textArrayList.get(1).getText().matches(\"\\d+\")) {\n\t\t\t\t\t\tint maxAllowedTotalBorrowCount=Integer.parseInt(textArrayList.get(0).getText());\n\t\t\t\t\t\tint maxAllowedSingleBorrowCount=Integer.parseInt(textArrayList.get(1).getText());\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tstatement.execute(\"update settings set maxAllowedTotalBorrowCount=\"+maxAllowedTotalBorrowCount+\",maxAllowedSingleBorrowCount=\"+maxAllowedSingleBorrowCount);\n\t\t\t\t\t\t} catch (Exception e2) {\n\t\t\t\t\t\t\t\/\/ TODO: handle exception\n\t\t\t\t\t\t\te2.printStackTrace();\n\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tMessageBox messageBox=new MessageBox(shell,SWT.ICON_INFORMATION|SWT.OK);\n\t\t\t\t\t\tmessageBox.setText(\"\u63d0\u793a\");\n\t\t\t\t\t\tmessageBox.setMessage(\"\u8bf7\u8f93\u5165\u5927\u4e8e0\u7684\u6574\u6570\uff01\");\n\t\t\t\t\t\tmessageBox.open();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif(!shell.isDisposed()) {\n\t\t\t\t\tMessageBox messageBox=new MessageBox(shell,SWT.ICON_INFORMATION|SWT.OK);\n\t\t\t\t\tmessageBox.setText(\"\u63d0\u793a\");\n\t\t\t\t\tmessageBox.setMessage(\"\u5df2\"+operationStr);\n\t\t\t\t\tmessageBox.open();\n\t\t\t\t\tshell.dispose();\n\t\t\t\t}\t\t\t\t\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tokButton.setBounds(20, 25 * i + 50, 80, 30);\n\t\tokButton.setText(operationStr);\n\t\tButton cancelButton = new Button(shell, 0);\n\t\tcancelButton.setBounds(120, 25 * i + 50, 80, 30);\n\t\tcancelButton.setText(\"\u53d6\u6d88\");\n\t\tcancelButton.addSelectionListener(new SelectionAdapter() {\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t}\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u641c\u7d22\u754c\u9762 SearchUI<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">SearchUI.java:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<pre class=\"language-sql wp-block-code\"><code class=\"language-sql\">import java.sql.ResultSet;\nimport java.sql.Statement;\nimport java.util.ArrayList;\nimport org.eclipse.swt.SWT;\nimport org.eclipse.swt.widgets.Button;\nimport org.eclipse.swt.widgets.Display;\nimport org.eclipse.swt.widgets.Group;\nimport org.eclipse.swt.widgets.Label;\nimport org.eclipse.swt.widgets.Shell;\nimport org.eclipse.swt.widgets.Text;\nimport org.eclipse.swt.events.SelectionAdapter;\nimport org.eclipse.swt.events.SelectionEvent;\npublic class SearchUI {\n\tprotected Shell shell;\n\tstatic String objectStr=\"\";\n\tstatic String&#91;] conditionStrArray= {};\n\tstatic Statement statement=null;\n\tstatic String account=\"\";\n\tstatic String role=\"\";\n\tstatic ExtendedTable extendedTable;\n\tArrayList&amp;lt;Text> textArrayList=new ArrayList&amp;lt;Text>();\n\t\/**\n\t * Launch the application.\n\t * @param args\n\t *\/\n\tpublic SearchUI(String newAccount,String newRole,String newObjectStr,String&#91;] newConditionStrArray,Statement newStatement) {\n\t\t\/\/ TODO Auto-generated constructor stub\n\t\taccount=newAccount;\n\t\trole=newRole;\n\t\tobjectStr=newObjectStr;\n\t\tconditionStrArray=newConditionStrArray;\n\t\tstatement=newStatement;\n\t}\n\tpublic static void main(String&#91;] args) {\n\t\ttry {\n\t\t\tSearchUI window = new SearchUI(account,role,objectStr,conditionStrArray,statement);\n\t\t\twindow.open();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}\n\t\/**\n\t * Open the window.\n\t *\/\n\tpublic void open() {\n\t\tDisplay display = Display.getDefault();\n\t\tcreateContents();\n\t\tshell.open();\n\t\tshell.layout();\n\t\twhile (!shell.isDisposed()) {\n\t\t\tif (!display.readAndDispatch()) {\n\t\t\t\tdisplay.sleep();\n\t\t\t}\n\t\t}\n\t}\n\t\/**\n\t * Create contents of the window.\n\t *\/\n\tprotected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(692, 456);\n\t\tshell.setText(objectStr+\"\u67e5\u8be2\");\n\t\tshell.setMaximumSize(692,456);\n\t\tshell.setMinimumSize(692,456);\n\t\t\n\t\tLabel tipLabel = new Label(shell, SWT.NONE);\n\t\ttipLabel.setBounds(5, 8, 96, 17);\n\t\ttipLabel.setText(\"\u8bf7\u586b\u5199\u67e5\u8be2\u6761\u4ef6\");\n\t\tint i=0;\n\t\tfor(String conditionStr:conditionStrArray) {\n\t\t\tLabel label=new Label(shell,0);\n\t\t\tlabel.setText(conditionStr);\n\t\t\tlabel.setBounds(157*i+5, 30, 50, 25);\n\t\t\tlabel.setAlignment(SWT.RIGHT);\n\t\t\tText text=new Text(shell, 0);\n\t\t\ttext.setBounds(157*i+55, 30, 100, 20);\n\t\t\ttextArrayList.add(text);\n\t\t\ti++;\t\t\t\n\t\t}\n\t\tGroup group = new Group(shell, SWT.NONE);\n\t\tgroup.setText(\"\u6240\u6709\u7ed3\u679c\");\n\t\tgroup.setBounds(5, 87, 661, 320);\t\t\n\t\t\n\t\tButton searchBtn = new Button(shell, SWT.NONE);\n\t\tsearchBtn.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tupdate(group);\n\t\t\t}\n\t\t});\t\t\n\t\tupdate(group);\n\t\tsearchBtn.setBounds(496, 54, 80, 27);\n\t\tsearchBtn.setText(\"u67E5u8BE2\");\n\t\tButton cancelBtn = new Button(shell, SWT.NONE);\n\t\tcancelBtn.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t}\n\t\t});\n\t\tcancelBtn.setBounds(586, 54, 80, 27);\n\t\tcancelBtn.setText(\"u53D6u6D88\");\n\t}\n\tvoid update(Group group) {\n\t\tif(extendedTable!=null)\n\t\t\textendedTable.dispose();\n\t\tgroup.setText(\"\u67e5\u8be2\u7ed3\u679c\");\n\t\tString isbn=\"\";\n\t\tString bookName=\"\";\n\t\tString userAccount=\"\";\n\t\tString userName=\"\";\n\t\tString operationType=\"\";\n\t\tString &#91;] tableHeadersStrArray= {};\n\t\tString &#91;] contextStrArray= {};\n\t\tResultSet resultSet=null;\n\t\tString tableName=null;\n\t\tswitch (objectStr) {\n\t\tcase \"\u4e66\u7c4d\":\n\t\t\ttableName=\"books\";\n\t\t\tisbn=textArrayList.get(0).getText();\n\t\t\tbookName=textArrayList.get(1).getText();\n\t\t\tString author=textArrayList.get(2).getText();\n\t\t\tString publisher=textArrayList.get(3).getText();\n\t\t\ttry {\t\t\t\t\t\t\n\t\t\t\ttableHeadersStrArray=new String&#91;] {\"ISBN\",\"\u4e66\u540d\",\"\u4f5c\u8005\",\"\u7c7b\u578b\",\"\u51fa\u7248\u793e\",\"\u51fa\u7248\u65e5\u671f\",\"\u9986\u85cf\u6570\u91cf\",\"\u501f\u51fa\u6570\u91cf\",\"\u672a\u501f\u51fa\u6570\u91cf\",\"\u72b6\u6001\",\"\u6dfb\u52a0\u65e5\u671f\"};\n\t\t\t\tresultSet=statement.executeQuery(\"select isbn,bookName,author,bookType,publisher,publishDate,totalCount,borrowedCount,unborrowedCount,bookState,addBookDate from books where isbn like '%\"+isbn+\"%' and bookname like '%\"+bookName+\"%' and author like '%\"+author+\"%' and publisher like '%\"+publisher+\"%'\");\n\t\t\t} catch (Exception e2) {\n\t\t\t\t\/\/ TODO: handle exception\n\t\t\t\te2.printStackTrace();\n\t\t\t}\t\t\t\t\t\n\t\t\tbreak;\n\t\tcase \"\u7528\u6237\":\n\t\t\ttableName=\"uses\";\n\t\t\tuserAccount=textArrayList.get(0).getText();\n\t\t\tuserName=textArrayList.get(1).getText();\n\t\t\ttry {\n\t\t\t\ttableHeadersStrArray=new String&#91;] {\"\u7528\u6237\u540d\",\"\u59d3\u540d\",\"\u5bc6\u7801\",\"\u8eab\u4efd\",\"\u72b6\u6001\",\"\u6dfb\u52a0\u65e5\u671f\"};\n\t\t\t\tresultSet=statement.executeQuery(\"select userAccount,userName,userPassword,userRole,userState,addUserDate from users where userAccount like '%\"+userAccount+\"%' and userName like '%\"+userName+\"%'\");\t\t\t\t\t\t\t\n\t\t\t} catch (Exception e2) {\n\t\t\t\t\/\/ TODO: handle exception\n\t\t\t\te2.printStackTrace();\n\t\t\t}\n\t\t\tbreak;\n\t\tcase \"\u501f\u9605\u72b6\u6001\":\n\t\t\ttableName=\"states\";\n\t\t\tisbn=textArrayList.get(2).getText();\n\t\t\tbookName=textArrayList.get(3).getText();\n\t\t\tuserAccount=textArrayList.get(0).getText();\n\t\t\tuserName=textArrayList.get(1).getText();\n\t\t\ttry {\t\t\t\t\n\t\t\t\ttableHeadersStrArray=new String&#91;] {\"\u7528\u6237\u540d\",\"\u59d3\u540d\",\"ISBN\",\"\u4e66\u540d\",\"\u5171\u501f\",\"\u5df2\u8fd8\",\"\u672a\u8fd8\"};\n\t\t\t\tresultSet=statement.executeQuery(\"select userAccount,userName,isbn,bookName,borrowedCount,returnedCount,unReturnedCount from states where isbn like '%\"+isbn+\"%' and bookName like '%\"+bookName+\"%' and userAccount like '%\"+userAccount+\"%' and userName like '%\"+userName+\"%'\");\n\t\t\t} catch (Exception e2) {\n\t\t\t\t\/\/ TODO: handle exception\n\t\t\t\te2.printStackTrace();\n\t\t\t}\n\t\t\tbreak;\n\t\tcase \"\u6211\u7684\u501f\u9605\u72b6\u6001\":\t\t\t\n\t\t\tisbn=textArrayList.get(0).getText();\n\t\t\tbookName=textArrayList.get(1).getText();\n\t\t\ttry {\n\t\t\t\ttableHeadersStrArray=new String&#91;] {\"\u7528\u6237\u540d\",\"\u59d3\u540d\",\"ISBN\",\"\u4e66\u540d\",\"\u5171\u501f\",\"\u5df2\u8fd8\",\"\u672a\u8fd8\"};\n\t\t\t\tresultSet=statement.executeQuery(\"select userAccount,userName,isbn,bookName,borrowedCount,returnedCount,unReturnedCount from states where isbn like '%\"+isbn+\"%' and bookName like '%\"+bookName+\"%' and userAccount ='\"+account+\"'\");\n\t\t\t} catch (Exception e2) {\n\t\t\t\t\/\/ TODO: handle exception\n\t\t\t\te2.printStackTrace();\n\t\t\t}\n\t\t\tbreak;\n\t\tcase \"\u501f\u9605\u8bb0\u5f55\u8be6\u60c5\":\n\t\t\ttableName=\"records\";\n\t\t\ttry {\n\t\t\t\toperationType=textArrayList.get(0).getText();\n\t\t\t\ttableHeadersStrArray=new String&#91;] {\"\u64cd\u4f5c\u65f6\u95f4\",\"\u7528\u6237\u540d\",\"\u59d3\u540d\",\"ISBN\",\"\u4e66\u540d\",\"\u64cd\u4f5c\u7c7b\u578b\",\"\u64cd\u4f5c\u6570\u91cf\"};\n\t\t\t\tresultSet=statement.executeQuery(\"select operationDatetime,userAccount,userName,isbn,bookName,operationType,operationCount from records where operationType like '%\"+operationType+\"%' and userAccount='\"+account+\"' and isbn='\"+role+\"'\");\n\t\t\t} catch (Exception e2) {\n\t\t\t\t\/\/ TODO: handle exception\n\t\t\t\te2.printStackTrace();\n\t\t\t}\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\textendedTable=new ExtendedTable(shell,group, SWT.CENTER|SWT.MULTI|SWT.FULL_SELECTION,account,role,tableName,tableHeadersStrArray,statement,resultSet);\n\t\textendedTable.setBounds(5, 20, 651, 290);\n\t}\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">&nbsp;\u4e0d\u8db3\u4e4b\u5904<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u4f7f\u7528\u672c\u5730\u6570\u636e\u5e93\uff0c\u53ea\u80fd\u5728\u672c\u5730\u8fd0\u884c\uff1b<\/li>\n\n\n\n<li>\u501f\u8fd8\u529f\u80fd\u8bbe\u8ba1\u5f97\u6709\u4e9b\u9690\u85cf\uff1b<\/li>\n\n\n\n<li>\u6ca1\u6709\u8bbe\u8ba1\u501f\u9605\u671f\u9650\u63d0\u793a\u548c\u8d85\u671f\u5904\u7406\u529f\u80fd\uff1b<\/li>\n<\/ol>\n\n\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5de5\u5177\uff1a IDE\uff1aEclipse IDE for Java Developers-2023-09 \u6570\u636e\u5e93\uff1aMySQL 8 \u529f\u80fd\u8bf4\u660e \u7528java SWT\u505a\u4e00\u4e2a\u56fe\u4e66\u7ba1&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","vk_price":"0"},"categories":[1],"tags":[25,26],"class_list":["post-331","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-java","tag-26"],"views":2124,"_links":{"self":[{"href":"https:\/\/noting.online\/index.php?rest_route=\/wp\/v2\/posts\/331","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/noting.online\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/noting.online\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/noting.online\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/noting.online\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=331"}],"version-history":[{"count":5,"href":"https:\/\/noting.online\/index.php?rest_route=\/wp\/v2\/posts\/331\/revisions"}],"predecessor-version":[{"id":481,"href":"https:\/\/noting.online\/index.php?rest_route=\/wp\/v2\/posts\/331\/revisions\/481"}],"wp:attachment":[{"href":"https:\/\/noting.online\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=331"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/noting.online\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=331"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/noting.online\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=331"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}