Let me start by saying I dont know Java but most code is more or less the same structure. msgID is used as a switch variable, the simplest example of this is binary code 1 and 0.
for example;
var msgID
if (msgID == 1) {
echo "hello world";
} else if (msgID == 0) {
echo "goodbyle world";
}
for example. If the switch is equal to 1 the code outputs hello world. if its 0 goodbye world. Simple.
repaint is a function you have right at the bottom of your sample code to change the text and position it where you have set it. So you would want something like;
if (msgID == 1) {
repaint(1);
} else if (msgID == -1) {
repaint(-1);
}
Your using the switch in the code to determine the action to take and the func to do the action and re-set the variable so it knows the next action to take, if that makes sense?
after this line "private int xPos, yPos; // hold the coordinates of the banner"
add
private int msgID = 1;
Hope this explains it a little and helps you on your way. Tell your tutor that silverlight would be a much better use of your time for programming a rotating banner add