Hello everyone, i'm making a visual class, wich have a Jtable, in wich i would like to display different kind of data, one of the columns will contain an object i created myself with an expiration date, with the corresponding methods, (setExpirationDate(boolean b), and hasExpired() - boolean), i already made the renderer wich shows on the cell a red tag with the legend "expired", if hasExpired return true, if it is on the last month before it expires, the renderer shows a yellow tag with the "near expiration" legend (it has the method wich return boolean if it is on the last month), and there is the green tag with the "in order".
Im using as cellEditor on this particular column the org.jdesktop.swingx.table.DatePickerCellEditor, when i execute the program it shows the datepicker, when i click the cell, but then i click on the day i want to choose, it passes null value, so i have an object with a null date, and the program start throwing exceptions. I want to know if i can get the selected date on the DatePickerCellEditor cell, then create the object on the setValue() method, with that date, for the specific column, on MyTableModel (wich extends AbstractTableModel). Is this what should be done? i'm getting the whole "Java idea" wrong? Any suggestion or ideas? .
Well i'm working on a small compilable program using my classes, as example so all of you can see what i'm doing, but it will take a while since i have to Chop a larger program, and change some variables names and comments since english is not my native languaje, and you wont understand most of the program.
Thank you in advance.
Germán.-
Im using as cellEditor on this particular column the org.jdesktop.swingx.table.DatePickerCellEditor, when i execute the program it shows the datepicker, when i click the cell, but then i click on the day i want to choose, it passes null value, so i have an object with a null date, and the program start throwing exceptions. I want to know if i can get the selected date on the DatePickerCellEditor cell, then create the object on the setValue() method, with that date, for the specific column, on MyTableModel (wich extends AbstractTableModel). Is this what should be done? i'm getting the whole "Java idea" wrong? Any suggestion or ideas? .
Well i'm working on a small compilable program using my classes, as example so all of you can see what i'm doing, but it will take a while since i have to Chop a larger program, and change some variables names and comments since english is not my native languaje, and you wont understand most of the program.
Thank you in advance.
Germán.-