Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * Jason Cheung
- * Program2
- */
- import wheels.users.*;
- import java.awt.Color;
- public class MyCharacters extends Frame {
- private CartoonCharacter _char1;
- private CartoonCharacter _char2;
- private CartoonCharacter _char3;
- private ConversationBubble _charTalk1, _charTalk2, _charTalk3;
- public MyCharacters() {
- _char1 = new CartoonCharacter(Color.RED,Color.GREEN,Color.BLUE,Color.CYAN,Color.BLACK,Color.PINK,100,200,50,50);
- _char2 = new CartoonCharacter(Color.GREEN,Color.BLACK,Color.CYAN,Color.PINK,Color.RED,Color.BLUE,375,200,80,50);
- _char3 = new CartoonCharacter(Color.BLACK,Color.YELLOW,Color.GREEN,Color.BLUE,Color.PINK,Color.CYAN,630,200,20,50);
- _charTalk1 = new ConversationBubble("I am in the 62% of adults in the USA that are skinny, average, or overweight.");
- _charTalk1.setLocation(0,20);
- _charTalk2 = new ConversationBubble("I am in the 36% of adults in the USA that are obese.");
- _charTalk2.setLocation(250,50);
- _charTalk3 = new ConversationBubble("I am in the 2% of adults in the USA that are underweight.");
- _charTalk3.setLocation(490,50);
- }
- public static void main(String [] args) {
- MyCharacters app = new MyCharacters();
- }
- }
Add Comment
Please, Sign In to add comment