• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to insert JDatePicker to JTable column  RSS feed

 
joe encalada
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi to all. Now I'm facing this problem. Somebody ask me to use a datepicker(Jdatepicker-1.3.4) on a Jtable and I have read some information about using editors and renderers.

So far. I have a simple JTable and using line below I get the JDatePicker on column 3.

Here my renderer.

Here is my problem. When I click on the JDatePicker of column 3 nothing happens, I guess is matter of get an editor for that column too, but I dont know how. Can you suggest me how to do it?
 
Rob Camick
Ranch Hand
Posts: 2763
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Read the section from the Swing tutorial on Using Other Editors.

It shows how to use a JColorChooser and an editor. The concept will be similar for a JDatePicker.
 
joe encalada
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok I'm gonna read it. Thank you.
 
Campbell Ritchie
Sheriff
Posts: 54090
130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which date picker are you using? Tödter's?
 
joe encalada
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm using datepicker(Jdatepicker-1.3.4). JDatePicker
 
joe encalada
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi to all, I've found Custom Editor but using JSpinner. It is quite similar, anyway here is the code:

I hope it could be helpfull to somebody.
 
joe encalada
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is the webpage. From I get the Custom Editor using JSpinner.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!