本节概要
在上一节中实现了图书添加功能,而在本节将实现图书维护界面以及图书记录的查询、修改和删除。
创建实体类
由于要将数据库查询到的记录显示到表格中,但是JavaFX中表格显示数据的类型不同,因此需要再创建实体类。
在beans包创建BookBeanTableData.java类,其内容如下:
package BookManageSystem.beans;
import javafx.beans.property.SimpleStringProperty;
public class BookBeanTableData {
private SimpleStringProperty bookId;
private SimpleStringProperty bookName;
private SimpleStringProperty bookAuthor;
private SimpleStringProperty bookAuthorSex;
private SimpleStringProperty bookPrice;
private SimpleStringProperty bookDescription;
private SimpleStringProperty bookType;
public BookBeanTableData() {}
public BookBeanTableData(String bookId, String bookName, String bookAuthor, String bookAuthorSex, String bookPrice, String bookDescription, String bookType) {
this.bookId = new SimpleStringProperty(bookId);
this.bookName = new SimpleStringProperty(bookName);
this.bookAuthor = new SimpleStringProperty(bookAuthor);
this.bookAuthorSex = new SimpleStringProperty(bookAuthorSex);
this.bookPrice = new SimpleStringProperty(bookPrice);
this.bookDescription = new SimpleStringProperty(bookDescription);
this.bookType = new SimpleStringProperty(bookType);
}
public String getBookId() {
return bookId.get();
}
public SimpleStringProperty bookIdProperty() {
return bookId;
}
public void setBookId(String bookId) {
this.bookId.set(bookId);
}
public String getBookName() {
return bookName.get();
}
public SimpleStringProperty bookNameProperty() {
return bookName;
}
public void setBookName(String bookName) {
this.bookName.set(bookName);
}
public String getBookAuthor() {
return bookAuthor.get();
}
public SimpleStringProperty bookAuthorProperty() {
return bookAuthor;
}
public void setBookAuthor(String bookAuthor) {
this.bookAuthor.set(bookAuthor);
}
public String getBookAuthorSex() {
return bookAuthorSex.get();
}
public SimpleStringProperty bookAuthorSexProperty() {
return bookAuthorSex;
}
public void setBookAuthorSex(String bookAuthorSex) {
this.bookAuthorSex.set(bookAuthorSex);
}
public String getBookPrice() {
return bookPrice.get();
}
public SimpleStringProperty bookPriceProperty() {
return bookPrice;
}
public void setBookPrice(String bookPrice) {
this.bookPrice.set(bookPrice);
}
public String getBookDescription() {
return bookDescription.get();
}
public SimpleStringProperty bookDescriptionProperty() {
return bookDescription;
}
public void setBookDescription(String bookDescription) {
this.bookDescription.set(bookDescription);
}
public String getBookType() {
return bookType.get();
}
public SimpleStringProperty bookTypeProperty() {
return bookType;
}
public void setBookType(String bookType) {
this.bookType.set(bookType);
}
}
Dao层方法
由于需要对数据库表的记录进行查询,所以在BookDao中添加如下方法:
/**
* 操作结果:根据参数sql获取数据库记录数据
*
* @param sql SQL语句
* @return List 返回包含记录Records对象的集合
*/
public List getRecordsDataBySql(String sql) {
Connection conn = null;
Statement stmt = null;
ResultSet rs = null;
List list = new ArrayList();
try {
//获得数据的连接
conn = JDBCUtils.getConnection();
//获得Statement对象
stmt = conn.createStatement();
//发送SQL语句
rs = stmt.executeQuery(sql);
while (rs.next()) {
BookBean bookBean = new BookBean();
// 索引是从1开始的
bookBean.setBookId(rs.getInt(1));
bookBean.setBookName(rs.getString(2));
bookBean.setBookAuthor(rs.getString(3));
bookBean.setBookAuthorSex(rs.getString(4));
bookBean.setBookPrice(rs.getFloat(5));
bookBean.setBookDescription(rs.getString(6));
bookBean.setBookTypeId(rs.getString(7));
list.add(bookBean);
}
} catch (Exception e) {
e.printStackTrace();
} finally {
JDBCUtils.release(rs, stmt, conn);
}
return list;
}
实现对图书记录的查询根据SQL语句。
界面设计
接下来就是创建图书维护界面了,在view包下创建bookManageFrame.fxml文件,使用Scene Builder进行设计,代码如下:
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.text.Font?>
<AnchorPane prefHeight="700.0" prefWidth="800.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="BookManageSystem.controller.BookManageFrameController">
<children>
<VBox alignment="CENTER" prefHeight="700.0" prefWidth="800.0">
<children>
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
<children>
<Label text="图书维护功能">
<font>
<Font name="System Bold" size="40.0"/>
</font>
</Label>
</children>
</HBox>
<HBox alignment="CENTER" prefHeight="90.0" prefWidth="600.0" spacing="10.0">
<children>
<Label text="图书名称:"/>
<TextField fx:id="bookNameTextField" prefHeight="30.0" prefWidth="104.0"/>
<Label text="图书作者:"/>
<TextField fx:id="bookAuthorTextField" prefHeight="30.0" prefWidth="94.0"/>
<Label text="图书类别:"/>
<ComboBox fx:id="bookTypeComboBox" prefHeight="30.0" prefWidth="107.0" promptText="请选择"/>
<Button fx:id="checkButton" mnemonicParsing="false" onAction="#do_checkButton_event" text="查询"/>
<Button fx:id="resetButton" mnemonicParsing="false" onAction="#do_resetButton_event" text="重置"/>
</children>
</HBox>
<HBox alignment="CENTER" prefHeight="347.0" prefWidth="600.0">
<children>
<TableView fx:id="bookManageTableView" prefHeight="200.0" prefWidth="605.0"
tableMenuButtonVisible="true">
<columns>
<TableColumn fx:id="idTableColumn" prefWidth="75.0" text="编号"/>
<TableColumn fx:id="bookNameTableColumn" prefWidth="97.0" text="图书名称"/>
<TableColumn fx:id="bookAuthorTableColumn" prefWidth="77.0" text="图书作者"/>
<TableColumn fx:id="authorSexTableColumn" prefWidth="71.0" text="作者性别"/>
<TableColumn fx:id="bookPriceTableColumn" prefWidth="75.0" text="图书价格"/>
<TableColumn fx:id="bookDescriptionTableColumn" prefWidth="114.0" text="图书描述"/>
<TableColumn fx:id="bookTypeTableColumn" prefWidth="90.0" text="图书类别"/>
</columns>
</TableView>
</children>
</HBox>
<HBox alignment="CENTER" prefHeight="268.0" prefWidth="600.0">
<children>
<VBox alignment="CENTER" prefHeight="200.0" prefWidth="601.0">
<children>
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
<children>
<VBox alignment="CENTER" prefHeight="200.0" prefWidth="100.0" spacing="15.0">
<children>
<Label text="编号:"/>
<Label text="价格:"/>
</children>
</VBox>
<VBox alignment="CENTER" prefHeight="200.0" prefWidth="100.0" spacing="10.0">
<children>
<TextField fx:id="idTextField"/>
<TextField fx:id="priceTextField"/>
</children>
</VBox>
<VBox alignment="CENTER" prefHeight="200.0" prefWidth="100.0" spacing="15.0">
<children>
<Label text="图书名称:"/>
<Label text="图书作者:"/>
</children>
</VBox>
<VBox alignment="CENTER" prefHeight="200.0" prefWidth="100.0" spacing="10.0">
<children>
<TextField fx:id="bookNameTextField2" prefHeight="10.0"
prefWidth="100.0"/>
<TextField fx:id="bookAuthorTextField2"/>
</children>
</VBox>
<VBox alignment="CENTER" prefHeight="200.0" prefWidth="100.0" spacing="15.0">
<children>
<Label text="作者性别:"/>
<Label text="图书类别:"/>
</children>
</VBox>
<VBox alignment="CENTER" prefHeight="200.0" prefWidth="100.0" spacing="10.0">
<children>
<HBox alignment="CENTER" prefHeight="29.0" prefWidth="100.0">
<children>
<RadioButton fx:id="maleRadioButton" mnemonicParsing="false"
text="男">
<toggleGroup>
<ToggleGroup fx:id="sex"/>
</toggleGroup>
</RadioButton>
<RadioButton fx:id="femaleRadioButton" mnemonicParsing="false"
text="女" toggleGroup="$sex"/>
</children>
</HBox>
<HBox alignment="CENTER" prefHeight="28.0" prefWidth="100.0">
<children>
<ComboBox fx:id="bookTypeComboBox2" prefHeight="30.0"
prefWidth="125.0" promptText="请选择"/>
</children>
</HBox>
</children>
</VBox>
</children>
</HBox>
<HBox alignment="TOP_CENTER" prefHeight="68.0" prefWidth="601.0" spacing="40.0">
<children>
<Label text="图书描述:"/>
<TextArea fx:id="bookDescriptionTextArea" prefHeight="78.0" prefWidth="449.0"/>
</children>
</HBox>
<HBox alignment="CENTER" prefHeight="66.0" prefWidth="601.0" spacing="100.0">
<children>
<Button fx:id="alterButton" mnemonicParsing="false"
onAction="#do_alterButton_event" text="修改"/>
<Button fx:id="delteButton" mnemonicParsing="false"
onAction="#do_delteButton_event" text="删除"/>
<Button fx:id="resetButton2" mnemonicParsing="false"
onAction="#do_resetButton2_event" text="重置"/>
</children>
</HBox>
</children>
</VBox>
</children>
</HBox>
</children>
</VBox>
</children>
</AnchorPane>
并且在controller包下创建BookManageFrameController.java类,从Scene Builder中复制控制器代码到该类中,并实例化SimpleTools和BookDao两个类:
package BookManageSystem.controller;
import BookManageSystem.beans.BookBeanTableData;
import BookManageSystem.beans.BookTypeBean;
import BookManageSystem.dao.BookDao;
import BookManageSystem.dao.BookTypeDao;
import BookManageSystem.tools.SimpleTools;
import javafx.collections.FXCollections;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.scene.control.*;
import java.util.List;
public class BookManageFrameController {
private SimpleTools simpleTools = new SimpleTools();
private BookDao bookDao = new BookDao();
@FXML
private TextField idTextField;
@FXML
private Button alterButton;
@FXML
private RadioButton maleRadioButton;
@FXML
private RadioButton femaleRadioButton;
@FXML
private TextField bookAuthorTextField2;
@FXML
private ComboBox bookTypeComboBox2;
@FXML
private TableColumn<BookBeanTableData, String> idTableColumn;
@FXML
private TableColumn<BookBeanTableData, String> authorSexTableColumn;
@FXML
private TableColumn<BookBeanTableData, String> bookPriceTableColumn;
@FXML
private ComboBox<?> bookTypeComboBox;
@FXML
private Button checkButton;
@FXML
private Button resetButton;
@FXML
private Button resetButton2;
@FXML
private TableColumn<BookBeanTableData, String> bookAuthorTableColumn;
@FXML
private TableView<BookBeanTableData> bookManageTableView;
@FXML
private TextArea bookDescriptionTextArea;
@FXML
private TextField bookAuthorTextField;
@FXML
private TableColumn<BookBeanTableData, String> bookNameTableColumn;
@FXML
private TableColumn<BookBeanTableData, String> bookDescriptionTableColumn;
@FXML
private TextField bookNameTextField2;
@FXML
private TextField priceTextField;
@FXML
private Button delteButton;
@FXML
private TextField bookNameTextField;
@FXML
private TableColumn<BookBeanTableData, String> bookTypeTableColumn;
// 【查询】按钮的事件监听器
public void do_checkButton_event(ActionEvent event) {
}
// 【修改】按钮的事件监听器
public void do_alterButton_event(ActionEvent event) {
}
// 【删除】按钮的事件监听器
public void do_delteButton_event(ActionEvent event) {
}
// 【重置】按钮的事件监听器
public void do_resetButton2_event(ActionEvent event) {
}
// 【重置】按钮的事件监听器
public void do_resetButton_event(ActionEvent event) {
}
}
界面效果如下:
初始化表格数据
在BookManageFrameController.java中添加如下方法初始化表格数据,即将从数据库查询的记录显示在表格中。
/**
* 初始化图书维护界面控件
*/
public void initialize() {
// 批量为按钮添加图标
simpleTools.setLabeledImage(new Labeled[]{alterButton, delteButton, resetButton2}, new String[]{"src/BookManageSystem/images/edit" +
".png",
"src/BookManageSystem/images/delete.png", "src/BookManageSystem/images/reset.png"});
// 设置显示id号的文本框不可编辑
idTextField.setDisable(true);
// 查询图书信息的SQL语句
String sql = "select bId,bBookName,bAuthor,bSex,bPrice,bBookDescription,btName from tb_book,tb_booktype where tb_book.btId=tb_booktype.btId;";
// 填充表格数据,初始化表格视图
simpleTools.setBookTableViewData(bookManageTableView
, simpleTools.getBookTableViewData(sql)
, idTableColumn
, bookNameTableColumn
, bookAuthorTableColumn
, authorSexTableColumn
, bookPriceTableColumn
, bookDescriptionTableColumn
, bookTypeTableColumn
);
// 查询图书类别的SQL语句
String getBookTypeSQL = "select * from tb_booktype";
List bookTypeList = new BookTypeDao().getRecordsDataBySql(getBookTypeSQL);
String[] typeNames = new String[bookTypeList.size()];
for (int i = 0; i < bookTypeList.size(); i++) {
BookTypeBean bookTypeBean = (BookTypeBean) bookTypeList.get(i);
typeNames[i] = bookTypeBean.getBookTypeName();
}
// 为下拉列表框填充选项
simpleTools.addComboBoxItems(bookTypeComboBox, typeNames);
simpleTools.addComboBoxItems(bookTypeComboBox2, typeNames);
}
initialize方法初始化了按钮的图标,下拉列表框的选项和表格的数据。
由于要填充数据到JavaFX的表格控件中,因此在SimpleTools.java类中写了两个方法来填充数据,代码如下:
/**
* 将数据显示在图书表格中
*
* @param tableView 表格视图控件
* @param data 要显示要表格上的数据
* @param idColumn ID表格列控件
* @param nameColumn 图书名字表格列控件
* @param authorColumn 图书作者表格列控件
* @param sexColumn 图书作者性别表格列控件
* @param priceColumn 图书价格表格列控件
* @param descriptionColumn 图书描述表格列控件
* @param typeColumn 图书类别表格列控件
*/
public void setBookTableViewData(TableView tableView, ObservableList data, TableColumn<BookBeanTableData, String> idColumn, TableColumn<BookBeanTableData, String> nameColumn, TableColumn<BookBeanTableData, String> authorColumn, TableColumn<BookBeanTableData, String> sexColumn, TableColumn<BookBeanTableData, String> priceColumn, TableColumn<BookBeanTableData, String> descriptionColumn, TableColumn<BookBeanTableData, String> typeColumn) {
// 设置id列的数据
idColumn.setCellValueFactory(cellData -> cellData.getValue().bookIdProperty());
// 设置图书名称列的数据
nameColumn.setCellValueFactory(cellData -> cellData.getValue().bookNameProperty());
// 设置图书作者列的数据
authorColumn.setCellValueFactory(cellData -> cellData.getValue().bookAuthorProperty());
// 设置图书作者性别列的数据
sexColumn.setCellValueFactory(cellData -> cellData.getValue().bookAuthorSexProperty());
// 设置图书价格列的数据
priceColumn.setCellValueFactory(cellData -> cellData.getValue().bookPriceProperty());
// 设置图书描述列的数据
descriptionColumn.setCellValueFactory(cellData -> cellData.getValue().bookDescriptionProperty());
// 设置图书类别列的数据
typeColumn.setCellValueFactory(cellData -> cellData.getValue().bookTypeProperty());
// 将数据设置到表格视图
tableView.setItems(data);
}
/**
* 通过SQL从数据库表中查询图书数据并进行封装
*
* @param sql SQL语句
* @return 返回ObservableList<BookBeanTableData>类型的数据
*/
public ObservableList<BookBeanTableData> getBookTableViewData(String sql) {
BookDao bookDao = new BookDao();
List list = bookDao.getRecordsDataBySql(sql);
ObservableList<BookBeanTableData> data = FXCollections.observableArrayList();
for (int i = 0; i < list.size(); i++) {
BookBean r = (BookBean) list.get(i);
BookBeanTableData td = new BookBeanTableData(String.valueOf(r.getBookId()), r.getBookName(), r.getBookAuthor(), r.getBookAuthorSex(), String.valueOf(r.getBookPrice()), r.getBookDescription(), String.valueOf(r.getBookTypeId()));
data.add(td);
}
return data;
}
接着就是让图书维护菜单项点击后,切换到该界面。
因此在MainApp.java中添加如下方法加载图书维护界面的FXML文件:
/**
* 图书维护界面
* @return 返回一个AnchorPane便于其他控件调用
*/
public AnchorPane initBookManageFrame() {
try {
FXMLLoader loader = new FXMLLoader();
loader.setLocation(getClass().getResource("view/bookManageFrame.fxml"));
AnchorPane root = loader.load();
return root;
} catch (IOException e) {
e.printStackTrace();
}
return null;
}
并在MainFrameController.java中的图书维护菜单项事件中调用起来,因此do_bookManageMenuItem_event方法的代码如下:
/**
* “图书维护”菜单项的事件处理
* @param event 事件
*/
public void do_bookManageMenuItem_event(ActionEvent event) {
// 当点击“图书维护”菜单项后,加载图书维护面板
AnchorPane pane = new MainApp().initBookManageFrame();
// 清空界面上原有的控件
mainFrameAnchorPane.getChildren().clear();
// 将图书维护面板添加到界面上
mainFrameAnchorPane.getChildren().add(pane);
}
到此,运行程序点击“图书维护”菜单项该界面就会出现了
选中表格行显示数据
接下来是实现当用户选中表格中某一行时,将该行的数据显示在下面的文本框中。
在BookManageFrameController.java中添加如下方法用来将选中行的内容显示在下面的文本框中:
// 选中某行后行内容显示在下面文本框中
public void showBookDetails(BookBeanTableData bookBeanTableData) {
// 判断用户是否选中表格中的某一行
if (bookManageTableView.getSelectionModel().getSelectedIndex() < 0) {
return;
} else {
// 如果选中表格中的某一行,则将选中行的数据显示在下面的文本框中
idTextField.setText(bookBeanTableData.getBookId());
bookNameTextField2.setText(bookBeanTableData.getBookName());
if (bookBeanTableData.getBookAuthorSex().equals("男")) {
maleRadioButton.setSelected(true);
} else if (bookBeanTableData.getBookAuthorSex().equals("女")) {
femaleRadioButton.setSelected(true);
}
priceTextField.setText(bookBeanTableData.getBookPrice());
bookAuthorTextField2.setText(bookBeanTableData.getBookAuthor());
// 设置分类
String str = bookBeanTableData.getBookType();
int index = 0;
List inputList = FXCollections.observableArrayList(bookTypeComboBox.getItems());
for (int i = 0; i < inputList.size(); i++) {
if (str.equals(inputList.get(i))) {
index = i;
}
}
bookTypeComboBox2.getSelectionModel().select(index);
bookDescriptionTextArea.setText(bookBeanTableData.getBookDescription());
}
}
接着在initialize方法中调用这个方法,添加如下代码:
// 为表格注册事件监听器
bookManageTableView.getSelectionModel().selectedItemProperty().addListener(
(observable, oldValue, newValue) -> showBookDetails(newValue));
运行如下:
查询功能
点击“查询”按钮,表格显示用户查询得来的数据。
其事件处理代码如下:
// 【查询】按钮的事件监听器
public void do_checkButton_event(ActionEvent event) {
// 查询SQL语句
String sql = "select bId,bBookName,bAuthor,bSex,bPrice,bBookDescription,btName from tb_book,tb_booktype where" +
" tb_book.btId=tb_booktype.btId ";
// 判断用户是否输入图书名称,模糊查询
if (!simpleTools.isEmpty(bookNameTextField.getText())) {
sql += " and bBookName like '%" + bookNameTextField.getText() + "%'";
}
// 判断用户是否输入作者名称,模糊查询
if (!simpleTools.isEmpty(bookAuthorTextField.getText())) {
sql += " and bAuthor like '%" + bookAuthorTextField.getText() + "%'";
}
// 判断用户是否选择图书类别
String booktype = (String) bookTypeComboBox.getSelectionModel().selectedItemProperty().getValue();
if (!simpleTools.isEmpty(booktype)) {
sql += " and btName='" + booktype + "';";
}
// 通过SQL语句查询到的数据重新填充表格,刷新表格显示的数据
simpleTools.setBookTableViewData(bookManageTableView
, simpleTools.getBookTableViewData(sql)
, idTableColumn
, bookNameTableColumn
, bookAuthorTableColumn
, authorSexTableColumn
, bookPriceTableColumn
, bookDescriptionTableColumn
, bookTypeTableColumn
);
}
运行,输入查询条件进行查询,结果如下:
修改功能
修改图书记录。
其事件处理代码在BookManageFrameController.java中如下:
// 【修改】按钮的事件监听器
public void do_alterButton_event(ActionEvent event) {
// 获取用户输入的修改数据
String id = idTextField.getText();
String bookName = bookNameTextField2.getText();
String authorSex = "";
if (maleRadioButton.isSelected()) {
authorSex = maleRadioButton.getText();
} else if (femaleRadioButton.isSelected()) {
authorSex = femaleRadioButton.getText();
}
String price = priceTextField.getText();
String bookAuthor = bookAuthorTextField2.getText();
String bookType = (String) bookTypeComboBox2.getSelectionModel().selectedItemProperty().getValue();
String description = bookDescriptionTextArea.getText();
// 组装SQL语句
String bookTypeSQL = "select * from tb_booktype where btName='" + bookType + "';";
List bookTypeList = new BookTypeDao().getRecordsDataBySql(bookTypeSQL);
BookTypeBean bookTypeBean = (BookTypeBean) bookTypeList.get(0);
// 获取图书类别id
int bookTypeId = bookTypeBean.getBookTypeId();
// 组装修改SQL语句
String alterSQL =
"update tb_book set bBookName='" + bookName + "',bAuthor='" + bookAuthor + "',bSex='" + authorSex +
"',bPrice=" + price + ",bBookDescription='" + description + "',btId=" + bookTypeId + " where " +
"bId=" + id + ";";
// 执行SQL语句并返回结果
boolean isOK = bookDao.dataChange(alterSQL);
// 对结果进行判断
if (isOK) {
// 修改成功则重新刷新表格,并重置用户输入
initialize();
do_resetButton2_event(null);
simpleTools.informationDialog(Alert.AlertType.INFORMATION, "提示", "信息", "修改成功!");
} else {
// 修改失败则弹出提示框
simpleTools.informationDialog(Alert.AlertType.ERROR, "提示", "错误", "修改失败!");
}
}
执行效果如下:
删除功能
删除选中的表格行记录。
其事件处理代码如下:
// 【删除】按钮的事件监听器
public void do_delteButton_event(ActionEvent event) {
// 获取id文本框的值
String id = idTextField.getText();
// 组装SQL语句,通过id来删除记录
String deleteSQL = "delete from tb_book where bId=" + id + ";";
// 执行删除操作
boolean isOK = bookDao.dataChange(deleteSQL);
// 对结果进行判断处理
if (isOK) {
// 删除成功则刷新表格
initialize();
do_resetButton2_event(null);
simpleTools.informationDialog(Alert.AlertType.INFORMATION, "提示", "信息", "删除成功!");
} else {
// 删除失败弹出提示框
simpleTools.informationDialog(Alert.AlertType.ERROR, "提示", "错误", "删除失败!");
}
}
重置功能
界面上有两个重置按钮,其事件处理代码如下:
// 【重置】按钮的事件监听器
public void do_resetButton2_event(ActionEvent event) {
// 清空用户输入
simpleTools.clearTextField(idTextField, bookNameTextField2, priceTextField, bookAuthorTextField2,
bookDescriptionTextArea);
simpleTools.clearSelectedRadioButton(femaleRadioButton, maleRadioButton);
simpleTools.clearSelectedComboBox(bookTypeComboBox2);
}
// 【重置】按钮的事件监听器
public void do_resetButton_event(ActionEvent event) {
// 清空用户并刷新表格
simpleTools.clearTextField(bookNameTextField, bookAuthorTextField);
simpleTools.clearSelectedComboBox(bookTypeComboBox);
initialize();
}
可搜索微信公众号【Java实例程序】或者扫描下方二维码关注公众号获取更多。
注意:在公众号后台回复【20200303】获取本节源码。
来源:CSDN
作者:二木成林
链接:https://blog.csdn.net/cnds123321/article/details/103981395