JXDatePicker日历空间(日期选择器)
来源:互联网 发布:算法复杂性o, 编辑:程序博客网 时间:2024/06/06 08:32
mport javax.swing.*;
import com.l2fprod.common.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.text.*;
/**
*
* @author zwql
*/
public class JTaskPaneTest extends javax.swing.JFrame {
/**
* Creates new form JTaskPaneTest
*/
public JTaskPaneTest() {
initComponents();
jTaskPaneGroup1.setTitle("aaa is aa's son");
jTaskPaneGroup2.setTitle("xx is xxx's father");
DateFormat[] dateFormat = new DateFormat[1];
dateFormat[0] = new SimpleDateFormat("yyyy-MM-dd");
jXDatePicker1.setFormats(dateFormat);
jXDatePicker1.setDate(null);
}
Action makeAction(String title, String tooltiptext, String iconPath) {
Action action = new AbstractAction(title) {
public void actionPerformed(ActionEvent e) {}
};
action.putValue(Action.SMALL_ICON, new ImageIcon(iconPath));
action.putValue(Action.SHORT_DESCRIPTION, tooltiptext);
return action;
}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
// <editor-fold defaultstate="collapsed" desc=" 生成的代码 ">
private void initComponents() {
jScrollPane1 = new javax.swing.JScrollPane();
jTaskPane1 = new com.l2fprod.common.swing.JTaskPane();
jTaskPaneGroup1 = new com.l2fprod.common.swing.JTaskPaneGroup();
jButton1 = new javax.swing.JButton();
jLinkButton1 = new JLinkButton("xxxxx",new ImageIcon("d:/wqlfiles/icon/z.ico"));
jTaskPaneGroup2 = new com.l2fprod.common.swing.JTaskPaneGroup();
jButton2 = new javax.swing.JButton();
jTextField1 = new javax.swing.JTextField();
jButton3 = new javax.swing.JButton();
jXDatePicker1 = new org.jdesktop.swingx.JXDatePicker();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
jButton1.setText("jButton1");
jLinkButton1.setText("jLinkButton1");
jLinkButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jLinkButton1ActionPerformed(evt);
}
});
org.jdesktop.layout.GroupLayout jTaskPaneGroup1Layout = new org.jdesktop.layout.GroupLayout(jTaskPaneGroup1.getContentPane());
jTaskPaneGroup1.getContentPane().setLayout(jTaskPaneGroup1Layout);
jTaskPaneGroup1Layout.setHorizontalGroup(
jTaskPaneGroup1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jButton1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 209, Short.MAX_VALUE)
.add(jLinkButton1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 209, Short.MAX_VALUE)
);
jTaskPaneGroup1Layout.setVerticalGroup(
jTaskPaneGroup1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(org.jdesktop.layout.GroupLayout.TRAILING, jTaskPaneGroup1Layout.createSequentialGroup()
.add(jLinkButton1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 11, Short.MAX_VALUE)
.add(jButton1))
);
jButton2.setText("jButton2");
jTextField1.setText("jTextField1");
jButton3.setText("jButton3");
org.jdesktop.layout.GroupLayout jTaskPaneGroup2Layout = new org.jdesktop.layout.GroupLayout(jTaskPaneGroup2.getContentPane());
jTaskPaneGroup2.getContentPane().setLayout(jTaskPaneGroup2Layout);
jTaskPaneGroup2Layout.setHorizontalGroup(
jTaskPaneGroup2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jButton2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 209, Short.MAX_VALUE)
.add(jTaskPaneGroup2Layout.createSequentialGroup()
.add(10, 10, 10)
.add(jTextField1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 151, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jButton3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 40, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(45, 45, 45))
);
jTaskPaneGroup2Layout.setVerticalGroup(
jTaskPaneGroup2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(org.jdesktop.layout.GroupLayout.TRAILING, jTaskPaneGroup2Layout.createSequentialGroup()
.addContainerGap()
.add(jTaskPaneGroup2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jTextField1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jButton3))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 18, Short.MAX_VALUE)
.add(jButton2))
);
org.jdesktop.layout.GroupLayout jTaskPane1Layout = new org.jdesktop.layout.GroupLayout(jTaskPane1);
jTaskPane1.setLayout(jTaskPane1Layout);
jTaskPane1Layout.setHorizontalGroup(
jTaskPane1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jTaskPane1Layout.createSequentialGroup()
.addContainerGap()
.add(jTaskPane1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false)
.add(org.jdesktop.layout.GroupLayout.LEADING, jTaskPaneGroup1, 0, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.add(org.jdesktop.layout.GroupLayout.LEADING, jTaskPaneGroup2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 231, Short.MAX_VALUE))
.addContainerGap())
);
jTaskPane1Layout.setVerticalGroup(
jTaskPane1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jTaskPane1Layout.createSequentialGroup()
.addContainerGap()
.add(jTaskPaneGroup1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(39, 39, 39)
.add(jTaskPaneGroup2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addContainerGap(94, Short.MAX_VALUE))
);
jScrollPane1.setViewportView(jTaskPane1);
org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.addContainerGap()
.add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(72, 72, 72)
.add(jXDatePicker1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 119, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addContainerGap(119, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.addContainerGap()
.add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 299, Short.MAX_VALUE))
.add(layout.createSequentialGroup()
.add(38, 38, 38)
.add(jXDatePicker1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
.addContainerGap())
);
pack();
}// </editor-fold>
private void jLinkButton1ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO 将在此处添加您的处理代码:
JDirectoryChooser dc = new JDirectoryChooser();
dc.showOpenDialog(this);
}
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new JTaskPaneTest().setVisible(true);
}
});
}
// 变量声明 - 不进行修改
public javax.swing.JButton jButton1;
public javax.swing.JButton jButton2;
public javax.swing.JButton jButton3;
public com.l2fprod.common.swing.JLinkButton jLinkButton1;
public javax.swing.JScrollPane jScrollPane1;
public com.l2fprod.common.swing.JTaskPane jTaskPane1;
public com.l2fprod.common.swing.JTaskPaneGroup jTaskPaneGroup1;
public com.l2fprod.common.swing.JTaskPaneGroup jTaskPaneGroup2;
public javax.swing.JTextField jTextField1;
public org.jdesktop.swingx.JXDatePicker jXDatePicker1;
// 变量声明结束
}
- JXDatePicker日历空间(日期选择器)
- 日历--弹出式日期选择器
- Android 日历(gridview) 日期选择器
- JXDatePicker
- Android日历阴阳历转换的实现(包括日期选择器)
- laydate日期空间与时间选择器
- 应用于web页面的日期(日历)时间选择器(控件)
- 我的组件库--java Date Picker 日历 日期选择器
- 一个轻量级jQuery的日期选择器日历 glDatePicker
- 25.VRGCalendar一款支持标记自定义日期的日历选择器
- 一款形似Win10日历风格的日期时间选择器
- 安卓日历面板选择器-选择日期区间
- 日期选择器(Datepicker)
- (日期选择器)
- (翻译)日期选择器
- android基础-Toast提示框、日历视图(CalendarView)组件、日期、时间选择器DatePicker和TimerPicker等
- Calendar(日历)--选择日期
- 各种杂项组件(3)之--CalendarView(日历视图)、DatePicker/TimePicker(日期、时间选择器)、NumberPicker(数值选择器)
- MTK图层的介绍
- windows安装mysql3.23安装
- Qtopia移植
- dbm数据库源代码分析(12):gdbmreorg.c、gdbmseq.c和gdbmsetopt.c
- Web 设计与开发者必须知道的 15 个站点
- JXDatePicker日历空间(日期选择器)
- C#多线程学习(一) 多线程的相关概念
- 车·行·记
- log4net使用详解
- Java直连Access
- OpenGL Water Tutorial
- JDBC连接数据库经验集萃
- Setup Oracle based on ASM inside Solaris Zones.
- 日期时间脚本库方法列表