participate


Swing - swing.timer, concurency and repaintManager
<<   Back to Forum  |   Give us Feedback
This topic has 2 replies on 1 page.
kopik
Posts:110
Registered: 11/15/08
swing.timer, concurency and repaintManager   
Nov 4, 2009 5:17 AM

 
hii,

for kindergarten's Christmas soirée I want to write (donation) pictures SlideShow for PC, and quality photo (one piece) is expensive than USB medium,
1/ create a frame,
2/ add parent panel (with BorderLayout),
3/ to parent panel add 6 childPanels and define translucent border, or lay with BorderLayout(x,x), or define gap,
4/ to each childPanel add photoPanel strict, with calculated size (by screen resolutions and photo format, together) lay with
add(photoPanel, BorderLayout.CENTER);
5/ use some Blur for glassPane (childPanel),
6/ I want to change photo on some period from RIGHT TOP to left, then down and change directions to the RIGHT BOTTOM

<----- <-----

     
panel1 panel2 panel3

------------------------------------------------|
     
panel4 panel5 panel6


------> ------->

and here my questions:
a/ rotate only panels (in this case only panel valid for panel3's areas loads own BufferedImage for a new picture)
b/ or rotate link from panel to BufferedImage (in this case only buffer3 gets and translate a new picture)
c/ can I using swing.Timer for manage results from above question (add a/ or add b/), because:
--->
(this queries are concerning with Swing threads, only)
1/ how ways I can implements safe Stop (or Pause) button and safe Start (or Countinue) button,
2/ how ways I can implements click (safe to pause or stop this thread) on picture stoping this rotation
(I know to resize its contents, overpaint with Continue button),
3/ how ways I can start this rotations again,
4/ cos it shows for two diff. timers??? or two diff. threads using one timer???
<---

I look for simply and easiest way, thanks

... kopik
 
kevinaworkman
Posts:1,305
Registered: 3/30/09
Re: swing.timer, concurency and repaintManager   
Nov 4, 2009 5:45 AM (reply 1 of 2)  (In reply to original post )

 
Your questions are a bit too broad to answer specifically. I do have a question for you though: why not just use a pre-existing slide show program? We have a saying: if it ain't broke, don't fix it.. So what's broken about existing slide show programs?
 
Andre_Uhres
Posts:867
Registered: 5/17/05
Re: swing.timer, concurency and repaintManager   
Nov 4, 2009 7:27 AM (reply 2 of 2)  (In reply to original post )

 
kopik wrote:
I look for simply and easiest way

If we cannot use an existing slideshow, we should begin by specifying more clearly point 2 and 3 (concerning "Swing threads") and then develop a SlideshowModel.
 
This topic has 2 replies on 1 page.
Back to Forum
 
Read the Developer Forums Code of Conduct

Click to email this message Email this Topic

Edit this Topic
  
 
 
Forums Statistics

About Sun forums
  • Sun Forums is a large collection of user generated discussions. It is here to help you ask questions, find answers, and participate in discussions.

    Check out our guide on Getting started with Sun Forums for a full walkthrough of how to best leverage the benefits of this community.

Powered by Jive Forums