Results 1 to 2 of 2

Thread: UML Diagrams?

  1. #1
    backinqueez is offline Member
    Join Date
    Nov 2012
    Posts
    2
    Rep Power
    0

    Default UML Diagrams?

    I have a class implementing listeners.

    how do you make a uml doing so?

    for example so far i have

    BirdCatch
    main(args:String[]):void

    ------>

    BirdCatchPanel
    paintComponent(Graphic page):void

    how do you add this part into it? I'm a little confused.
    its part of the BirdCatchPanel class.

    Java Code:
    private class BirdCatchListener implements ActionListener, MouseListener
    	{
    
    		public void actionPerformed (ActionEvent event)
    		{
    			x += moveX;
    			y += moveY;
    			if (x <= 0 || x >= WIDTH-IMAGE_SIZE)
    				moveX = moveX * -1;
    			if (y <= 0 || y <= HEIGHT-IMAGE_SIZE)
    				moveY = moveY * -1;
    			repaint();
    		}
    
    		public void mousePressed(MouseEvent event)
    		{
    			if((int)event.getPoint().getX() >= x && (int)event.getPoint().getX() <= 400 &&
    					(int)event.getPoint().getY() >= y  && (int)event.getPoint().getY() <= 400)
    			catches++;
    		}
    		
    		public void mouseClicked(MouseEvent event){}
    		public void mouseReleased(MouseEvent event){}
    		public void mouseEntered(MouseEvent event){}
    		public void mouseExited(MouseEvent event){}
    	}
    }
    Last edited by backinqueez; 11-25-2012 at 09:51 PM.

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is online now Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,404
    Rep Power
    20

    Default Re: UML Diagrams?

    You didn't bother to follow up on the question you asked in MouseAdapter Class? so why should we expect any better behavior this time round?

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. UML Diagrams
    By joshking518 in forum New To Java
    Replies: 4
    Last Post: 01-27-2012, 10:20 AM
  2. how to add graphic diagrams to the arraylist
    By vijay4 in forum AWT / Swing
    Replies: 0
    Last Post: 12-11-2011, 02:34 PM
  3. In TabbedPane Diagrams do not appear
    By greenhorn in forum New To Java
    Replies: 1
    Last Post: 04-04-2011, 10:38 PM
  4. drag and drop for diagrams - help!
    By zoz in forum AWT / Swing
    Replies: 10
    Last Post: 12-20-2009, 07:59 PM
  5. Eclipse plugin for UML diagrams
    By nitingupta183 in forum Eclipse
    Replies: 3
    Last Post: 03-26-2008, 11:08 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •