Is there any way I can override the paintComponent method or otherwise
paint an image on the JFormattedTextField ?
I am able to add a mouse listener to the component and I want to pop
up a custom control when the user clicks on the first 20 pixels of the
DatePicker.
I have this working find and I just need to add an image for those 20
pixels. Normally I just subclass a component and have
protected void paintComponent(Graphics g) {
super.paintComponent(g);
Image searchImage = getSearchImage();
g.drawImage(searchImage, 1, 1, null);
}
but that doesn't work on the date picker. Or maybe it would work if I
could indent the date picker itself, not just the text.
Any ideas?
thanks!
Greg
|