Sunday, March 8, 2009

Monday, March 9: Menus Part four

OK, the last part of this assignment will be failry easy. What I want you to do is to add a Label to this window you've been popping up. Put some text in the label that will let me know that this is YOUR program; please be school appropriate in how you go about this. Here's how I added a label:



right below where I declared the window, I declared the label, like so:

Label gotAnyID;



right below where I created the window, I added this block of code:



gotAnyID = new Label("This label belongs to Mr. LaRue.");

gotAnyID.setBackground(Color.blue);

gotAnyID.setForeground (Color.yellow);

helpWindow.add(gotAnyID);



Cheers,

Uncle Paulie

No comments:

Post a Comment