Hi!
I'am programming a Swing JCalendar Component:
- 1 container; e.g. Year or Month with
- n child components ; e.g. Months or Days
displayed on screen.
Problem:
If I have an event that spans multiple days/weeks - yeah that
means: multiple JComponents - how do i paint it?
I dont want (or can't) put that Event-Component in all different
day components ... would be a mess handling.
My Idea:
1. Paint everthing in an offscreen Container(-Image) and implement
some smart paint method for the different day-components that
get a part of the offscreen image by offset (x,y).
Problem here; offscreen container will not paint, no peer; can I
use SwingUtilities.paintComponent()?
2. Do it like JTable ...
With a base-class, a data-model-class and a renderer-interface-class.
Any ideas for a good achitecture for the JCalendar problem from the
comunity?
ak - 24 Jul 2004 09:57 GMT
> I'am programming a Swing JCalendar Component:
> - 1 container; e.g. Year or Month with
> - n child components ; e.g. Months or Days
> displayed on screen
your second idea (renderer) is much better

Signature
Andrei Kouznetsov
http://uio.dev.java.net Unified I/O for Java
http://reader.imagero.com Java image reader