91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 4KB
    文件類型: .java
    金幣: 1
    下載: 0 次
    發布日期: 2021-06-12
  • 語言: Java
  • 標簽: java??swing??

資源簡介

java swing表格分頁控件封裝,有利于在開發中節約時間

資源截圖

代碼片段和文件信息

package?com.ydtf.common.action;

import?java.awt.FlowLayout;
import?java.awt.event.ActionEvent;
import?java.awt.event.ActionListener;
import?java.awt.event.ItemEvent;
import?java.awt.event.ItemListener;

import?javax.swing.JButton;
import?javax.swing.JComboBox;
import?javax.swing.JLabel;
import?javax.swing.JPanel;

public?abstract?class?SubPageBar?extends?JPanel?implements?ItemListener?ActionListener?{
private?static?final?long?serialVersionUID?=?-6040510785204761873L;
private?int?allCount?fromRec?endRec?pageSize?pageIndex?pageCount;
private?JLabel?allCountLab?curCountLab?pageIndexLab;
private?JComboBox?eachCom;
//?按鈕首頁
private?JButton?firstPageButton;
//?前一頁
private?JButton?latePageButton;
//?下一頁
private?JButton?nextPageButton;
//?末頁
private?JButton?lastPageButton;

public?SubPageBar(int?recNums)?{
this.allCount?=?recNums;
initUI();
updateData();
}

private?void?initUI()?{
//?comboBox
eachCom?=?new?JComboBox(new?String[]?{?“20“?“50“?“100“?});
//?label
curCountLab?=?new?JLabel();
allCountLab?=?new?JLabel();
pageIndexLab?=?new?JLabel();
//?button
firstPageButton?=?new?JButton(“首頁“);
nextPageButton?=?new?JButton(“下一頁“);
latePageButton?=?new?JButton(“前一頁“);
lastPageButton?=?new?JButton(“末頁“);
//?listener
eachCom.addItemListener(this);
firstPageButton.addActionListener(this);
nextPageButton.addActionListener(this);

latePageButton.addActionListener(this);
lastPageButton.addActionListener(this);

this.setLayout(new?FlowLayout(FlowLayout.LEFT));
this.add(curCountLab);
this.add(allCountLab);
this.add(new?JLabel(“每頁“));
this.add(eachCom);
this.add(new?JLabel(“條“));
this.add(firstPageButton);
this.add(nextPa

評論

共有 條評論