setSize over time
Hi guys what I want to do is set a new setSize which I can do but it just appears. Therefore what I want is for the setSize to move over time instead of just flicker and appear.
Any help would be appriciated:
if (e.getSource() == set) {
setSize(1000,1000);
}
Related Article: Run time reduction
is a solved Java discussion thread by FUTURECompEng that has 2 replies, was last updated 7 months ago and has been tagged with the keywords: recursion, run, time, java, problem, node, linked, list, method.
TIM_M_91
Junior Poster in Training
83 posts since Feb 2012
Reputation Points: 18
Solved Threads: 0
Skill Endorsements: 0
Do you mean that you want the component to grow "slowly", like an animation?
JamesCherrill
... trying to help
8,525 posts since Apr 2008
Reputation Points: 2,583
Solved Threads: 1,456
Skill Endorsements: 30
Do you mean that you want the component to grow "slowly", like an animation?
Thats what I mean't sorry if I didn't explain clearly
TIM_M_91
Junior Poster in Training
83 posts since Feb 2012
Reputation Points: 18
Solved Threads: 0
Skill Endorsements: 0
Use a javax.swing.Timer to execute an actionPerformed method every (eg) 60 millisecs. In each execution of the method increase the size by a small amount (eg 4 pixels). When it reaches the desired size, stop the Timer.
Doc and examples for Swing Timer in all the usual places.
JamesCherrill
... trying to help
8,525 posts since Apr 2008
Reputation Points: 2,583
Solved Threads: 1,456
Skill Endorsements: 30
Use a javax.swing.Timer to execute an actionPerformed method every (eg) 60 millisecs. In each execution of the method increase the size by a small amount (eg 4 pixels). When it reaches the desired size, stop the Timer.
Doc and examples for Swing Timer in all the usual places.
Could you show an example?
TIM_M_91
Junior Poster in Training
83 posts since Feb 2012
Reputation Points: 18
Solved Threads: 0
Skill Endorsements: 0
There are loads of examples and tutorials on the web. Just Google
JamesCherrill
... trying to help
8,525 posts since Apr 2008
Reputation Points: 2,583
Solved Threads: 1,456
Skill Endorsements: 30