• Post Reply Bookmark Topic Watch Topic
  • New Topic

SWT: Tutorials

 
K Terr
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Would anyone know of any good tutorials for building a calendar in java swt. i'm really stuck.

thanks in advanced,

K Terr.
 
Campbell Ritchie
Marshal
Posts: 52531
119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch.
Obviously nobody knows the exact answer to your query. There are a few places I would suggest:

I presume you are familiar with the usual Swing GUI writing techniques? Apart from the fact that they use terms like addActionListener(this) passim, you will find the Java tutorial good. If you want more discussion about ActionListeners, go into the search function and look for my number (I think 109202) and "anonymous inner class" and see what comes up. I am one of those people who dislike the construct addActionListener(this).

Once you have mastered the general GUI writing, have a look at Cay Horstmann's website, and see if you can use his GBC class instead of setting constraints individually for the GridBagLayout.

Have a look at the java.util.Calendar classes, particularly GregorianCalendar. It is a bit difficult to understand, I am afraid. And JANUARY = 0, DECEMBER = 11. Somebody was asking very recently, here, how you can get every Sunday throughout the year. You might find that useful information to get your calendar going.

Back to Horstmann. In Horstmann C, Cornell G, Core Java 2 (7/e), vol II-advanced features, Upper Saddle River, NJ: Prentice-Hall (Sun Microsystems Press) (2004), page 619-620, there is a screen capture of a calendar. It says the text of said Calendar (written by somebody called Kai T�dter) is available here.

Sorry I can't help any more, but I hope those suggestions have got you started.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!