社区
Java SE
帖子详情
求 好看的 swing 时间控件 , 能支持 yyyy-MM-dd HH:mm:ss 的最好
billwindows
2008-02-28 11:26:32
我在 网上找到一个 ,但老板说不好看 ,郁闷ing !-_-
...全文
1347
17
打赏
收藏
求 好看的 swing 时间控件 , 能支持 yyyy-MM-dd HH:mm:ss 的最好
我在 网上找到一个 ,但老板说不好看 ,郁闷ing !-_-
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
17 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
luanwuqingyang
2010-08-24
打赏
举报
回复
真的很有用吗,也给我发一下吧!email:fengyu_001@126.com 谢谢!
xiedayun
2008-04-15
打赏
举报
回复
大侠,有时间请给我发个这样的时间控件,EMAIL:xiedayun2008@163.com.
谢谢!
O2AtomLife
2008-04-15
打赏
举报
回复
一样做了,干嘛时间不做好,输错都不能提交
tangqingguang111
2008-03-25
打赏
举报
回复
上面的兄弟,我现在也正需要一个这样的组件。可以给我发一个齐全的吗?Email:tqingguang6688@126.com
billwindows
2008-03-03
打赏
举报
回复
问题解决~oo~
SINODATA_QJF
2008-03-01
打赏
举报
回复
此段程序已经做了整理,打成了JAR包,上传到资源库中,请自行下载
http://d.download.csdn.net/down/365468/SINODATA_QJF
billwindows
2008-02-29
打赏
举报
回复
神那,我快被你打败了~ NTriangle.java 这个类是 怎么写的哇 ? 可以把代码发到邮箱里么? 我邮箱是lixin211314@163.com 小弟再次感激不尽!
billwindows
2008-02-29
打赏
举报
回复
对了 ,哥们 告诉你个事 ,粘java 或者其他 程序可以 用这个csdn 上的工具,就发帖子的地方, 你点 带 # 图标的 按钮,就可以插入java 代码,在 那对标签里写东西就可以完整的把java 程序 拷贝过去了.就一次就ok 嘎嘎 例如:
System.out.pringtln("挖哈哈!")
billwindows
2008-02-29
打赏
举报
回复
你写的那些 N 打头的 一定全是 把 api 的类包了 一层,哈哈 ~oo~
billwindows
2008-02-29
打赏
举报
回复
十分感谢这个世界上还有你这样好的human,祝福你新的一年袄袄快乐 ~oo~
billwindows
2008-02-28
打赏
举报
回复
那先谢谢啦 ~oo~
SINODATA_QJF
2008-02-28
打赏
举报
回复
有是有,晚上提供给你啦
SINODATA_QJF
2008-02-28
打赏
举报
回复
晕,程序教长,传了4次
不过,此程序中,可能还引用到了别的类,不过那都是次要的
如:StringHandle类,基本是自己进行重新弄下就可以了
对了,N字头的类,把它改为J就行了
SINODATA_QJF
2008-02-28
打赏
举报
回复
private void fillInDayTabel(Calendar calendar) {
if( hField == NDateChooser.HAS_YMDF || hField == NDateChooser.HAS_YMDTF ) {
int totalDays,dayOfWeek,rowNumber,remainer,totalRowCount,counter =0;
rowData = new Vector(5,5);
totalDays = calendar.getActualMaximum(calendar.DAY_OF_MONTH);
ExtendCalendar tempCalendar = new ExtendCalendar(calendar.get(calendar.YEAR),calendar.get(calendar.MONTH),1);
dayOfWeek = tempCalendar.get(tempCalendar.DAY_OF_WEEK);
tempCalendar = null;
remainer = totalDays + dayOfWeek - 15;
for( rowNumber = 1; remainer >0; rowNumber++) {
remainer -= 7;
}
rowNumber++;
totalRowCount = dateChooserTableModel.getRowCount();
for( int rowCount = 0; rowCount < totalRowCount; rowCount ++) {
dateChooserTableModel.removeRow(0);
}
for( int i = 0; (counter < totalDays) && ( i < rowNumber ); i++ ) {
rowData.addElement(new Vector(5,5));
Vector v = (Vector) rowData.elementAt(i);
if( i == 0 ) {
for( int m = 1; m < dayOfWeek; m++ ) {
v.addElement("");
}
}
for( int j = ((i==0)? dayOfWeek : 1); (j <=7) && (counter < totalDays); j++) {
v.addElement(new Integer(++counter));
if( counter == totalDays ) {
for( ; j <= 7; j++ ) {
v.addElement("");
}
}
}
dateChooserTableModel.addRow(v);
}
dateChooserTable.repaint();
int row = currentSelectedCalendar.get(Calendar.WEEK_OF_MONTH) - 1;
int column = currentSelectedCalendar.get(Calendar.DAY_OF_WEEK) - 1;
dateChooserTable.setRowSelectionInterval(row,row);
dateChooserTable.setColumnSelectionInterval(column,column);
}
}
}
class GoingTimeThread extends Thread {
private static int SLEEPTIME = 1000;
private NTextField itf;
private String strValue = "", oldStrValue = "";
private boolean iNeedToStop = false; //是否需要停止线程, true运行线程 false停止线程
private int currentHour,currentMinute,currentSecond;
public GoingTimeThread(NTextField txtField) {
super();
this.itf = txtField;
}
public void run() {
while( ! iNeedToStop ) {
try {
Thread.sleep(SLEEPTIME);
} catch (InterruptedException e) {}
SwingUtilities.invokeLater(new Runnable() {
public void run() {
setTimeTextField(itf);
}
});
}
}
public void setTimeTextField(NTextField ajtf) {
String sHour,sMinute,sSecond;
Calendar timeCalendar = new ExtendCalendar(TimeZone.getDefault(),Locale.getDefault());
if( timeCalendar.get(Calendar.AM_PM) == Calendar.PM ) { //is pm
currentHour = timeCalendar.get(Calendar.HOUR) + 12;
sHour = (new Integer(currentHour)).toString();
} else {
currentHour = timeCalendar.get(timeCalendar.HOUR);
sHour = (new Integer(currentHour)).toString();
}
currentMinute = timeCalendar.get(timeCalendar.MINUTE);
sMinute = (new Integer(currentMinute)).toString();
currentSecond = timeCalendar.get(timeCalendar.SECOND);
sSecond = (new Integer(currentSecond)).toString();
sHour = StringHandle.fixLengthRight(sHour,'0',2);
sMinute = StringHandle.fixLengthRight(sMinute,'0',2);
sSecond = StringHandle.fixLengthRight(sSecond,'0',2);
oldStrValue = strValue.toString();
strValue = sHour + ":" + sMinute + ":" + sSecond;
ajtf.setText(strValue);
ajtf.repaint();
}
public String getTextFieldStr() {
return oldStrValue;
}
public void setNeedToStop(boolean blNeedStop) {
this.iNeedToStop = blNeedStop;
}
public boolean getNeedToStop() {
return this.iNeedToStop;
}
}
class ExtendCalendar extends GregorianCalendar {
public ExtendCalendar() {
this.complete();
}
public ExtendCalendar(TimeZone timeZone,Locale locale) {
super(timeZone,locale);
this.complete();
}
public ExtendCalendar(int year,int month,int day) {
super(year,month,day);
this.complete();
}
}
SINODATA_QJF
2008-02-28
打赏
举报
回复
private void monthComboBox_actionPerformed(ActionEvent e) {
if( monthComboBox.getSelectedIndex() < 0 ) return;
currentSelectedCalendar.set(Calendar.MONTH,monthComboBox.getSelectedIndex());
adjustDay(currentSelectedCalendar,monthComboBox.getSelectedIndex());
fillInDayTabel(currentSelectedCalendar);
}
private void adjustDay(Calendar cal,int selMonth) {
int day = cal.get(cal.DATE);
int month = cal.get(cal.MONTH);
if(month > selMonth) {
cal.set(cal.get(cal.YEAR),selMonth,day);
}
}
//判断是确认还是取消
public boolean isApplied() {
return (clickBtn == CLICK_CONFIRM);
}
public Calendar getCalendar() {
return this.currentSelectedCalendar;
}
public void setCalendar(Calendar aCalendar) {
currentSelectedCalendar = (Calendar)aCalendar.clone();
goingTimeThread.setNeedToStop(true);
try {
goingTimeThread.suspend();
} catch ( Exception ex ) {
System.out.println("goingTimeThread.suspend");
}
if( !currentSelectedCalendar.equals(rightNow) ) {
yearTextField.setText(new Integer(currentSelectedCalendar.get(Calendar.YEAR)).toString());
monthComboBox.setSelectedIndex(currentSelectedCalendar.get(Calendar.MONTH));
NDateDocument dateDocument = new NDateDocument(timeTextField);
timeTextField.setDocument(dateDocument);
fillTimeToTimeTextField(dateDocument,timeToStr(currentSelectedCalendar));
}
}
private void fillTimeToTimeTextField(NDateDocument doc,String sourceStr) {
try {
doc.insertString(0,sourceStr.substring(0,2),null);
doc.insertString(3,sourceStr.substring(3,5),null);
doc.insertString(6,sourceStr.substring(6,8),null);
} catch (Exception ex) {
System.out.println("fillTimeToTimeTextField error");
}
}
private String timeToStr(Calendar calendar) {
return "12:10";
}
private String currentSelectedTime = "";
private boolean validateTime() {
try {
if( goingTimeThread.isAlive() ) {
goingTimeThread.setNeedToStop(true);
}
currentSelectedTime = timeTextField.getText(); //不知道timeTextField对不对。请确认
int hour,minute,second;
hour = getIntValue(currentSelectedTime,0);
minute = getIntValue(currentSelectedTime,3);
second = getIntValue(currentSelectedTime,6);
if( hour >23 || minute > 59 || second > 59 ) {
//JOptionPane.showMessageDialog(""); //报告错误
System.out.println(" hour >23 || minute > 59 || second > 59");
return false;
} else {
currentSelectedCalendar = new GregorianCalendar(currentSelectedCalendar.get(Calendar.YEAR),currentSelectedCalendar.get(Calendar.MONTH),currentSelectedCalendar.get(Calendar.DATE),hour,minute,second);
return true;
}
} catch ( NumberFormatException ex) {
//JOptionPane.showMessageDialog(""); //报告错误
System.out.println("NumberFormatException");
return false;
}
}
public static int ILLEGALTIME = 1000;
private int getIntValue(String sourceStr,int off) {
String subStr ="";
Integer returnIntegerValue;
try {
if( off == 6 ) {
subStr = sourceStr.substring(off);
} else {
subStr = sourceStr.substring(off,off+2);
}
} catch (IndexOutOfBoundsException ex) {
System.out.println("IndexOutOfBoundsException error!");
}
try {
returnIntegerValue = new Integer(subStr);
} catch (NumberFormatException ex) {
returnIntegerValue = new Integer(ILLEGALTIME);
}
return returnIntegerValue.intValue();
}
private int hField = NDateChooser.HAS_YMDF;
private GoingTimeThread goingTimeThread = new GoingTimeThread(timeTextField);
private void initData() {
for(int i = 0; i < monthItems.length; i++) {
monthComboBox.addItem(monthItems[i]);
}
monthComboBox.setSelectedIndex(rightNow.get(rightNow.MONTH));
yearTextField.setEditable(false);
yearTextField.setText(new Integer(rightNow.get(rightNow.YEAR)).toString());
dateChooserTable.setCellSelectionEnabled(true);
dateChooserTable.setColumnSelectionAllowed(true);
dateChooserTable.setRowSelectionAllowed(true);
dateChooserTable.setSelectionBackground(Color.lightGray);
dateChooserTable.setSelectionForeground(Color.RED);
dateChooserTable.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION);
dateChooserTable.setRowHeight(SwingConfig.TableRowHeight);
if( hField == NDateChooser.HAS_TF || hField == NDateChooser.HAS_YF || hField == NDateChooser.HAS_YMF ) {
mainPanel.setPreferredSize(new Dimension(300,125));
} else {
mainPanel.setPreferredSize(new Dimension(400,280));
}
if( hField == NDateChooser.HAS_YMDTF || hField == NDateChooser.HAS_TF ) {
goingTimeThread.setTimeTextField(timeTextField);
}
switch( hField ) {
case NDateChooser.HAS_YF:
monthComboBox.setVisible(false);
case NDateChooser.HAS_YMF:
chooserDayScrollPane.setVisible(false);
case NDateChooser.HAS_YMDF:
timeTextField.setVisible(false);
fillInDayTabel(rightNow);
break;
case NDateChooser.HAS_TF:
yearTextField.setVisible(false);
monthComboBox.setVisible(false);
chooserDayScrollPane.setVisible(false);
upYearButton.setVisible(false);
downYearButton.setVisible(false);
case NDateChooser.HAS_YMDTF:
fillInDayTabel(rightNow);
goingTimeThread.start();
break;
default: //请后面修正这里的代码
System.out.println("error");
fillInDayTabel(rightNow);
}
}
private Vector rowData;
SINODATA_QJF
2008-02-28
打赏
举报
回复
cancleButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
cancleButton_actionPerformed(e);
}
});
confirmButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
confirmButton_actionPerformed(e);
}
});
dateChooserTable.addMouseListener(new MouseAdapter() {
public void mouseClicked(MouseEvent e) {
dateChooserTable_cliecked(e);
}
});
timeTextField.addFocusListener(new FocusAdapter() {
public void focusGained(FocusEvent e) {
timeTextField_focusGained(e);
}
});
}
private int getSelectYear(int iord) {
Integer integer;
String text = yearTextField.getText();
try {
integer = new Integer(text);
} catch (NumberFormatException ex) {
integer = new Integer(iord);
}
int tpi = integer.intValue();
if(iord == INDICATOR_OP_UP) {
integer = new Integer(++tpi);
if( tpi > 9999 ) {
integer = new Integer(9999);
}
yearTextField.setText(integer.toString());
return integer.intValue();
} else {
integer = new Integer(--tpi);
if( tpi < 1 ) {
integer = new Integer(1);
}
yearTextField.setText(integer.toString());
return integer.intValue();
}
}
private void timeTextField_focusGained(FocusEvent e) {
if( goingTimeThread!= null && goingTimeThread.getNeedToStop() == false ) {
goingTimeThread.setNeedToStop(true);
}
}
public static int INDICATOR_OP_NONE = 0;
public static int INDICATOR_OP_UP = 1;
public static int INDICATOR_OP_DOWN = 2;
private void upYearButton_actionPerformed(ActionEvent e) {
int year = getSelectYear(INDICATOR_OP_UP);
currentSelectedCalendar.set(Calendar.YEAR,year);
fillInDayTabel(currentSelectedCalendar);
}
private void downYearButton_actionPerformed(ActionEvent e) {
int year = getSelectYear(INDICATOR_OP_DOWN);
currentSelectedCalendar.set(Calendar.YEAR,year);
fillInDayTabel(currentSelectedCalendar);
}
public static int CLICK_CONFIRM = 1;
public static int CLICK_CANCLE = 2;
private int clickBtn = CLICK_CANCLE;
private void cancleButton_actionPerformed(ActionEvent e) {
if( goingTimeThread.isAlive() ) {
goingTimeThread.setNeedToStop(true);
}
clickBtn = CLICK_CANCLE;
this.setVisible(false);
}
private void confirmButton_actionPerformed(ActionEvent e) {
switch( hField ) {
case NDateChooser.HAS_TF:
if( validateTime()) {
clickBtn = CLICK_CONFIRM;
this.setVisible(false);
}
break;
case NDateChooser.HAS_YMDTF:
if( !validateTime() ) {
break;
}
case NDateChooser.HAS_YMDF:
if( !validateTime() ) {
break;
}
case NDateChooser.HAS_YMF:
case NDateChooser.HAS_YF:
clickBtn = CLICK_CONFIRM;
this.setVisible(false);
break;
default:
}
}
private void dateChooserTable_cliecked(MouseEvent me) {
if( dateChooserTable.getSelectedColumn() != -1 ) {
String s = dateChooserTable.getValueAt(dateChooserTable.getSelectedRow(),dateChooserTable.getSelectedColumn()).toString();
try {
Integer integer = new Integer(s);
currentSelectedCalendar.set(Calendar.DATE,integer.intValue());
} catch (NumberFormatException ex) {}
if( me.getClickCount() == 2 && me.getModifiers() == MouseEvent.BUTTON1_MASK && s != null && !s.equals("")) {
confirmButton_actionPerformed(null);
}
}
}
SINODATA_QJF
2008-02-28
打赏
举报
回复
程序稍长,为三次贴出,
import javax.swing.*;
import javax.swing.border.*;
import java.util.*;
import java.awt.*;
import java.awt.event.*;
import catic.library.swing.*;
import catic.library.swing.tree.*;
import catic.library.swing.table.*;
import catic.library.config.SwingConfig;
import catic.library.lang.StringHandle;
public class NDateChooserDlg extends NDialog {
private NPanel mainPanel = new NPanel();
private NPanel subPanel = new NPanel();
private NTextField yearTextField = new NTextField();
private JButton upYearButton = new JButton(new NTriangle(Color.black,NTriangle.UP) );
private JButton downYearButton = new JButton(new NTriangle(Color.black,NTriangle.DOWN) );
private NComboBox monthComboBox = new NComboBox();
private NTextField timeTextField = new NTextField();
private NScrollPane chooserDayScrollPane = new NScrollPane();
private ExtendCalendar rightNow = new ExtendCalendar(TimeZone.getDefault(),Locale.getDefault());
private Calendar currentSelectedCalendar = (ExtendCalendar)rightNow.clone();
private String[] dateChooserColums = {"星期日","星期一","星期二","星期三","星期四","星期五","星期六"};
private NTableModel dateChooserTableModel = new NTableModel(dateChooserColums);
private NTable dateChooserTable = new NTable(dateChooserTableModel);
private String[] monthItems = {"一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"};
private NPanel buttonPanel = new NPanel();
private NButton confirmButton = new NButton("确定");
private NButton cancleButton = new NButton("取消");
public NDateChooserDlg(JFrame frame,boolean model) {
this(frame,null,true,NDateChooser.HAS_YMDTF);
}
public NDateChooserDlg(JFrame frame,String title,boolean model) {
this(frame,title,true,NDateChooser.HAS_YMDTF);
}
public NDateChooserDlg(JFrame frame,String title,boolean model,int hasField) {
super(frame,title,model);
this.hField = hasField;
initData();
try {
initComponent();
pack();
} catch (Exception e) {}
}
private void initComponent() {
TitledBorder titleBorder = new TitledBorder(BorderFactory.createLineBorder(Color.gray,1),"日期/时间属性");
titleBorder.setTitleFont(NComponentFeature.getFont(NComponentFeature.FONT_DEFAULT));
subPanel.setBorder(BorderFactory.createCompoundBorder(titleBorder,BorderFactory.createEmptyBorder(5,5,5,5)));
subPanel.setLayout(new GridBagLayout());
yearTextField.setPreferredSize(new Dimension(60,20));
yearTextField.setMinimumSize(new Dimension(60,20));
upYearButton.setPreferredSize(new Dimension(20,10));
upYearButton.setMinimumSize(new Dimension(20,10));
downYearButton.setPreferredSize(new Dimension(20,10));
downYearButton.setMinimumSize(new Dimension(20,10));
subPanel.add(yearTextField,new GridBagConstraints(0,0,1,2,0.0,0.0,GridBagConstraints.NORTHWEST,GridBagConstraints.HORIZONTAL,new Insets(0,0,0,0),50,0));
subPanel.add(upYearButton,new GridBagConstraints(1,0,1,1,0.0,0.0,GridBagConstraints.CENTER,GridBagConstraints.NONE,new Insets(0,0,0,0),0,0));
subPanel.add(downYearButton,new GridBagConstraints(1,1,1,1,0.0,0.0,GridBagConstraints.CENTER,GridBagConstraints.NONE,new Insets(0,0,0,0),0,0));
subPanel.add(monthComboBox,new GridBagConstraints(2,0,1,2,0.0,0.0,GridBagConstraints.NORTHWEST,GridBagConstraints.HORIZONTAL,new Insets(0,10,0,0),40,-2));
subPanel.add(timeTextField,new GridBagConstraints(3,0,1,2,1.0,0.0,GridBagConstraints.NORTHWEST,GridBagConstraints.HORIZONTAL,new Insets(0,10,0,0),0,0));
subPanel.add(chooserDayScrollPane,new GridBagConstraints(0,2,4,1,1.0,1.0,GridBagConstraints.WEST,GridBagConstraints.BOTH,new Insets(10,0,0,0),0,0));
dateChooserTableModel.setCellEditTable(false);
chooserDayScrollPane.getViewport().add(dateChooserTable,null);
buttonPanel.setLayout(new FlowLayout(FlowLayout.RIGHT));
buttonPanel.add(confirmButton);
buttonPanel.add(cancleButton);
mainPanel.setLayout(new GridBagLayout());
mainPanel.add(subPanel,new GridBagConstraints(0,0,1,1,1.0,1.0,GridBagConstraints.WEST,GridBagConstraints.BOTH,new Insets(0,0,0,0),0,0));
mainPanel.add(buttonPanel,new GridBagConstraints(0,1,1,1,1.0,0.0,GridBagConstraints.WEST,GridBagConstraints.BOTH,new Insets(10,0,0,0),0,0));
mainPanel.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
this.getContentPane().add(mainPanel,BorderLayout.CENTER);
monthComboBox.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
monthComboBox_actionPerformed(e);
}
});
downYearButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
downYearButton_actionPerformed(e);
}
});
upYearButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
upYearButton_actionPerformed(e);
}
});
Java学习指南(
Swing
高级篇)
☆ Java程序员居家旅行必备课程 ☆Java学习指南系列的第4篇,介绍基于Java
Swing
的的高级应用技术。本篇的前一篇是
Swing
入门篇。
Swing
系列教程分为两篇:(1)
Swing
入门篇 (2)
Swing
高级篇。本篇内容至少包含:- 高级绘制技术,包含线型、渐变色、文本的精确绘制- 不规则形状及图表的绘制- 工作线程与界面线程的原理- 短任务、长任务、定时任务的应用举例- 弹出式窗口 Popup的使用方法- 短消息提示 Toaster 的设计与使用- 事件处理机制,鼠标键盘事件处理,以及一个基于键盘操作的“推箱子”游戏 - 多行文本的显示- 图片操作:缩放、剪裁、旋转、镜像,以及一个屏幕截图程序的实例- 管理型应用界面的框架- 向导型应用界面的框架- 文档型应用界面的框架- 拖放
支持
Drag & Drop,一个可拖拽排序的列表,以及一个拼图游戏的实现* 课程特色 *轻快 - 采用小章节教学,学起来轻松实用 - 以实际工程需要出发来设计课程有趣 - 穿插大量特效实例,增加趣味性和学员的成就感专业 - 课程中采用的代码库,就是经过良好封装的成熟的库本篇穿插多个实例,通过实例,综合运用多种技术,使学员对项目的构建有所有认识。
StackOverflow: 你没见过的七个最好的Java答案
分支预测SO上最多投票的一个Java问题是:为什么处理一个排序数组要比非排序数组快的多。为了回答这个问题,你需要使用分支预测(branch prediction)。分支预测是一种架构,旨在通过在真实的路径发生前猜测某一分支的下一步来提升处理过程。分支在这里即一个if语句。这样的话,如果是一个排序数组,那么分支预测将会进行,否则不会进行。Mysticial(so上的一个回答者)试图使用铁路和火车来简单
java
swing
时间
控件
_java
swing
日期
时间
控件
package yz;import java.awt.BorderLayout;import java.awt.Color;import java.awt.Cursor;import java.awt.Dimension;import java.awt.FlowLayout;import java.awt.Font;import java.awt.Frame;import java.awt.Gri...
金蝶EAS DEP脚本(4)——
控件
常用脚本之设置日期选择
控件
格式
设置日期选择
控件
格式 可在界面的onload扩展点后置脚本中添加过滤 参考实现: 表头日期
控件
的日期设置 // 直接在日期
控件
设置即可 pluginCtx.getK
DD
atePicker("bizDate").setDatePattern("
yyyy
-
MM
-
dd
HH
:
mm
:
ss
"); // 表头日期
控件
设置显示时分秒 pluginCtx.getK
DD
atePicker("bizDate...
图形界面系列教材 (十一)- 两种
Swing
下的日期
控件
DatePicker 和JXDatePicker
本例使用 datepicker.jar 包,有一个缺点,不能设置
时间
,只能在创建
控件
的时候传入指定日期。本例使用 包
swing
x-core-1.6.2.jar,界面比较简约,可以设置日期。
swing
没有自带的日期
控件
,需要第三方的类。jar包可以在右侧下载。需要设置日期,请使用。
Java SE
62,614
社区成员
307,326
社区内容
发帖
与我相关
我的任务
Java SE
Java 2 Standard Edition
复制链接
扫一扫
分享
社区描述
Java 2 Standard Edition
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章