FHTW Berlin

FB 4
Internationale Media and Computing
MeSoII: Media Software II
Sommersemester 2003


Exercise 5: Basic 2D programming

The tutorial for today is to be found at
http://developer.java.sun.com/developer/onlineTraining/Media/2DText/

It is not a JGuru tutorial, and is a bit terse on the explaination side. I would take points off for this, if it was submitted to me as a report :-) But the exercises are pretty cool, so we are going to run with it, anyway.

  1. "2D" means text layout und flow in Javaspeak. It is also concerned with Unicode, which is an important concept that I want you to understand this week. Read through the tutorial and play with the code snippets, reporting on what you played with. You are encouraged to make up exercises of your own or extend the ones that are there! As a first step, list the fonts that are available on your machine.
  2. Try lesson 2 and do the "Filling a Clipping Area with an Image" example, this is completely and totally cool!
  3. Putting up a "Hello World" in Hebrew or in Arabic adresses some interesting questions like character set and cursor position - these scripts are written right to left and not left to right. I would skip lesson 3 and read lesson 4. Choose one of the two languages and do a "Hello World" window for us! Mixing Arabic and English in one text is something wild for the bored.
  4. Go on and play with Justified Text in Lesson 5, but only if you have time.

Include the answers you gave for the multiple choice questions. Do you agree with all of the answers given?



The URL to your report, which will describe what you did during the exercise and include links to your code, is due in email box of your instructor by 8.00 next Wednesday. Do not forget to put your names on the top of the report! It is also a good idea put the number of the exercise somewhere in the title of your report.... When you send the URL of the report to your instructor, always include your partner in the CC. That way we don't get either 2 emails or none, because each or your thought the other was sending it. This has the added advantage that when we answer you, we can immediately answer both of you without having to look up the email account of your partner.


Copyright 2003, Debora Weber-Wulff (weberwu@fhtw-berlin.de)