Skip to main content

Re: disabling JXDatePicker linkPanel (this forum is driving me craaaaazy...)

2 replies [Last post]
kleopatra
Offline
Joined: 2003-06-11
Points: 0

(seem to be spurious downs for posting -  couldn't answer directly, got a "bad request from your browser" - how uncool is that :-(

What's wrong with datePicker.setLinkPanel to install a custom panel? The default has ... cough, cough ...  hard-coded colors and is private anyway.

Please let me know if you can meet your requirements, always open to improvements :-)

Cheers

Jeanette

 

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
jdoolin
Offline
Joined: 2010-12-21
Points: 0

Thanks for the reply.
datePicker.setLinkPanel was the first thing I tried, since I had read about it in the javadoc. My code was basically:
datePicker = new JXDatePicker(someDate);
JPanel linkPanel = new JPanel();
//do stuff to customize linkPanel
datePicker.setLinkPanel(linkPanel);
I've done a variety of things to customize the JPanel, including nothing at all, a label, and even went so far as to copy the TodayPanel class from JXDatePicker's source (only I used my own colors). I had a look at the source for setLinkPanel and it seemed pretty straightforward to me. However, the link panel never seems to get set to whatever I pass to it. It just keeps displaying the default link panel with white background and blue hyperlink.

kleopatra
Offline
Joined: 2003-06-11
Points: 0

hmm ... sounds like you might have hit a bug. Could you please file it in the swingx issue tracker, preferably with a small runnable example.
Thanks
Jeanette