Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / July 2004

Tip: Looking for answers? Try searching our database.

JCalendar Component; paint (invisible) offscreen or multiple parents ...

Thread view: 
Oliver Klein - 24 Jul 2004 09:49 GMT
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



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.