Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Date Picker in JTable.

701922Jul 29 2009 — edited Mar 9 2010
Hi !

I have JTable like below. In the column 1 and 2 user would input a date.

Now, I want to have date picker ie [ Calenlandar pop up ] to enable the user to pick the date.

Any help ?

By the way I tried http://www.toedter.com/en/jcalendar/index.html . I need help in integrating with JTable.

Thanks.
jTable1.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null}
            },
            new String [] {
                "Type of Env", "Start Date", "End Date", "Duration in weeks", "No.of patches", "No.of fresh installation", "No.of upgrades"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false, false, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jScrollPane1.setViewportView(jTable1);

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Apr 6 2010
Added on Jul 29 2009
8 comments
3,040 views