Results 1 to 5 of 5
  1. #1
    incredibleX is offline Member
    Join Date
    Nov 2013
    Posts
    30
    Rep Power
    0

    Talking Animating JInternalFrame

    Java Code:
    import javax.swing.*;
    
    public class AnimateJInternalFrame {
    
    	JFrame jf=new JFrame();
    	JInternalFrame jif=new JInternalFrame();
    	Timer t;
    	
    	public AnimateJInternalFrame() {
    		
    		jf.setSize(700,700);
    		jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    		jf.setLayout(null);
    		
    		
    		jif.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    		jif.setLayout(null);
    		jif.setBounds(50,50,300,300);
    		
    		
    		jf.setVisible(true);
    		jf.add(jif);
    		
    		t=new Timer(30,null);
    		t.start();
    		for(int i=50;i<500;i++){
    			jif.setBounds(50,i,300,300);
    			jif.setVisible(true);
    			}
    	
    	}
    	public static void main(String[] args) {
    		new AnimateJInternalFrame();
    
    	}
    
    }
    I want that JInternalFrame to animate smoothly downwards but it is'nt working.

    Whats the problem with my code?

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,305
    Rep Power
    25

    Default Re: Animating JInternalFrame

    Please post links to the other sites where this is posted.
    If you don't understand my response, don't ignore it, ask a question.

  3. #3
    incredibleX is offline Member
    Join Date
    Nov 2013
    Posts
    30
    Rep Power
    0

    Default Re: Animating JInternalFrame

    what do you mean?
    i've posted this thread to more than one forum so that i may get a faster reply.

  4. #4
    pj6444 is offline Senior Member
    Join Date
    Jan 2013
    Posts
    162
    Rep Power
    2

    Default Re: Animating JInternalFrame

    Cross posting is against the forum rules. It's not fair to waste the time of members if the question has already been answered somewhere else.

  5. #5
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    United States
    Posts
    3,378
    Rep Power
    5

    Default Re: Animating JInternalFrame

    Actually it is not against the forum rules to cross post. However, it is expected when it is done to have each post include a link to the post on the other sites.

    Regards,
    Jim
    The Java™ Tutorial | SSCCE | Java Naming Conventions
    Poor planning our your part does not constitute an emergency on my part.

Similar Threads

  1. Need Help in Animating JButton
    By incredibleX in forum Advanced Java
    Replies: 3
    Last Post: 01-25-2014, 04:06 PM
  2. [Slick] Animating a GIF?
    By SX16 in forum Java 2D
    Replies: 0
    Last Post: 11-27-2011, 02:52 AM
  3. Replies: 1
    Last Post: 09-27-2011, 04:19 PM
  4. Replies: 4
    Last Post: 09-27-2011, 09:20 AM
  5. Replies: 0
    Last Post: 08-09-2011, 06:07 PM

Posting Permissions

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