|
|
FB 4
Internationale Media and Computing
MeSoII: Media Software II
Sommersemester 2002
|
Exercise 6: Climbing
JTrees
This exercise will be done by the Tuesday group on
Max 14 and the Thursday group on May 23. I will try and be in the chat room at
noon on May 23 (I am at a conference in the USA, so it is 6 am my time ... ) The
Tuesday group has May 21 off so that we get back on schedule again!
- We are going to concentrate on figuring out how JTrees work this week. The
tutorial is still under http://developer.java.sun.com/developer/onlineTraining/GUI/Swing2/index.html.
JTrees use the MVC architecture we learned about last week. Read the section
on JTree and JTreePanel. - Do Magercise 1, TreeViews, and Magercise 2, Custom
JTreeRendering.
- Now we will be moving on to tables. There was a table
example in the SwingSet2 Demo we looked at two weeks ago. First read through the
JList section, then go on to the Swing Table Framework and JTable. It don't know
why, but they have mixed up the exercises here! Jump down and do the Magercise
4, JTable. You can do the example as stated, or make one column be the people
in your course and the second column be a picture of them (hard) or the name of
their favorite music group.
- Now read about the Java Text Framework. There
is so much that you can do to decorate text in Java. Try out the TextPaneDemo
(uh oh, no complete source code, just the snippet that does the work. Can you
get it to work anyway? Make the most beautiful Hello World TextPane you can!
- Do
the Magercise 3, JTextPane and see if you can create your very own text editor.
Can you believe it? I spent 1 1/2 years developing an editor as my diplom thesis
in 1984, and here you are, got a simple one working in a few hours. Java is powerful!
- If you have time, read through the look-and-feel section. Note down any
questions you have on this in your report.
The
URL to your report, which will describe what you did during the exercise and include
links to your code, is due in my email box by the start of exercise 4. This means
Tuesday at 8.00 for Group 1 and Thursday at 12.00 for Group 2. Do not forget to
put your names on the report! When you send the URL to me, include your partner
in the CC. That way I don't get either 2 emails or none, while each thought the
other was doing it. And when I answer you, I can immediately answer both of you
without having to look up your preferred email account.
Debora Weber-Wulff
(weberwu@fhtw-berlin.de)