Borland dbSwing date problems with JRE 1.6
We have found that dbSwing components (JdbTable, JdbTextField, JdbLabel etc) do not display dates when the application is run using JRE 1.6. The dates display correctly under JRE 1.5 and earlier.
The problem is caused by the method
protected String getDefaultPattern(int variantType)
in com.borland.dx.text.VariantFormatStr. In JRE 1.5 and earlier if no Formatter or Displaymask is set by the program, the function above loads a resource by
SystemResourceBundle.getLocaleElementsBundle(locale);
which gets the following Resourcebundle
sun.text.resources.LocaleElements
This bundle does not exist in 1.6 and an exception is thrown which is handled by setting the default Pattern to “”. These is the reason why nothing is displayed for date, time or timstamp columns.
To work round this we therefore need to set the displayMask for such columns e.g.
yourDateColumn.setDisplayMask("dd/MM/yyyy");
and dates are displayed correctly.

(2 votes, average: 4.5 out of 5)