New Freeware Delay AU: PolyFractus

From the web page:
Modulation Delay
"Model" is an OSX AU MOdulation DELay plugin. From classic echoes to strange modulations and musical patterns, you can Model your sound with unlimited random modulation patterns, filters and ring modulator.
Features :
* Stereo to Stereo processing
* 1ms to 1000ms delay time.
* 5 types of modulators.
* Random generated patterns with smooth function
* Envelope follower
* Decimator
* Ring modulator
* Low & High shelf filter in feedback path
* Lowpass filter in crossfeedback path
* Parameters randomizer
http://www.macmusic.org/softs/version.php/lang/EN/id/5808/

HT,
Do you have this one put on your computer yet or are you just posting a new free deal? And if so, how is it working (i.e. installs OK, doesn't lock up GB...)
Thanks for the heads up BTW HT.

Similar Messages

  • Set a new expiry delay for entries added in the cache by a read through

    Hi,
    I have an application that uses an Oracle Coherence cache backed by a database. Each item that is added in the cache must have a custom expiry delay computed from its content.
    Is it possible to set a new expiry delay for the entries loaded in the cache from the database by a read through operation?
    I tried setting a new expiry delay in the load method of the BinaryEntryStore, but it is ignored and the default expiry of the corresponding cache is used instead. Also I tried using a MapTrigger, but the entries added in the cache by a read through operation are not intercepted by the MapTrigger.
    Thanks,
    Adrian

    What we do (not sure if it proper way, but it worked for us) is extend the LocalCache and override the put method.
    public Object put(
    Object oKey,
    Object oValue,
    long expiry)
    long newexpiry = xxxxx;
    return super.put(oKey, oValue, newexpiry);
    }

  • DB Analyzer shows : Task 326 (Running) : execution of new commands delayed.

    Hello!
    We are investigating the performance of a MaxDB database. In the DB Analyser Protocol we find messages like this:
    Task 326 (Running) : execution of new commands delayed, cmd wait time 0.8 (0.34) ms, 35182 commands, application pid 31633
    I didn't find an explanation for this message in the docs. Does someone have a doc of this message or can someone explain?
    Can this be a performance relevant message?
    Thanks and Regards
    Bernd

    Without a context it's difficult to tell what this message means.
    Can you post the full list what the analyzer was showing?
    Markus

  • New Ipad delayed shipping??

    I pre-ordered my new ipad on the 8th of March and it said it was going to ship by the 16th. Today I get an e-mail saying personalized ipads were going to be delayed until the 20th. The e-mail came from [email protected] and I dont know if this email is legit or not? The email has no logo and it also has a misspelled word. I then called Apple and I asked them and the guy said that in his information the ipad was still scheduled for the 16th so now I don't know what to believe!!!  Any one else with this problem???   This is what the e-mail said...
    Dear Apple cutumer,
    Althugh we strive to meet every delivery commitment, we regret to inform
    you that your personalized iPad may be delayed until Tuesday, March 20.
    We want you to experience the new iPad as soon as possible.
    As a result, we're offering to expedite a replacement standard
    non-personalized iPad for you on March 16.
    If you ware interested in receiving the non-personalized iPad, please
    reply to this email by 4:00 p.m. local time today, March 14,
    If you choose to recieve the replacement iPad, you'll also receive an
    email from FedEx with prepaid return labels.  Please use these labels to
    return the personalize iPad.
    We apologize for any inconvenience this has caused.  Thank you for your
    business.
    Sincerely,
    The Apple Online Store.

    I got the same message but without the misspelled words.  I found it odd that Apple sent this with only 2 hrs to respond and yet I recieved the email after the deadline. I also called Apple store from my iphone apple app. They said that they are aware that the personalize ipads were going to be delayed. What a bummer because, I pre-ordered just a day later from it's release date. Since I was a half hour late to respond, they mentioned that an unpersonalized ipad was coming in today while the personalized one is on transit. And found that was an odd way of practice, since I wonder how much it would cost Apple to do this.
    I also checked the online order status. It mentioned that it will be delivered on the 16th as well.  I tracked the number and it was leaving China with a scheduled delivery on Monday, Mar. 19th. Then later that same day, it mentioned that it had an early delivery date for today, Mar. 16th.  That made me happy. Then I just checked this morning and now it left Anchorage, AK and now it had the delivery date on Mar. 19th.  Now I'm bummed out and confused as heck. Am I getting an nonpersonalized one or is my personalized one is coming on the 19th.
    Apple needs to work with their communication.  I thought they knew better on handling this, now I'm wondering...
    I guess, I'll just wait and see today the 16th. No way in heck that I'll be waiting on those crazy arse lines on product release days!

  • New line delayed due to debt?

    I've emailed the main BT address but it says they're busy and it might take 10 days to reply so I'm trying this forum!
    I ordered a new line for my new flat on August 22nd. A few days later I got a letter telling me to contact what I figured was the credit referral team. This seemed strange to me as I wasn't aware of any debt. I called them, which was not easy for me as I have a mental health condition that makes such calls very difficult and prefer to deal with finances online and by email. The person I spoke to had a very strong accent that I struggled to understand. All I could really pick out was that there was a debt of £250 that needed to be cleared. She couldn't tell me how or why, not that I could hear. So a couple of days later I tried BT chat help. The person was very helpful and contacted the referral team on my behalf. They said the debt is in the name of my former flatmate and I am being refused service because I was financially associated with him. Again they said if it's cleared I can go ahead. So I let him know and he spoke to BT. Apparently they claim he has no such debt. Now I am very confused. I tried to ring the credit referral team again but every person who answered had another difficult to follow accent and my anxiety levels have sky-rocketed with all this. I just want to know for sure exactly what is going on so I can get to the bottom of it and get my phone line. I work from home and really need the internet ASAP.
    Any ideas?

    Hi Franzi,
    Welcome to the forum and thanks for posting!
    I'm sorry for the confusion.  Send us over your details and we'll check this out from here.  Click on my username and under the "about me" section you'll see the link to get in touch with us.
    Cheers,
    Robbie
    BTCare Community Mod
    If we have asked you to email us with your details, please make sure you are logged in to the forum, otherwise you will not be able to see our ‘Contact Us’ link within our profiles.
    We are sorry that we are unable to deal with service/account queries via the private message(PM) function so please don't PM your account info, we need to deal with this via our email account :-)
    If someone answers your question correctly please let other members know by clicking on ’Mark as Accepted Solution’.

  • New phone delayed?

    I think that Verizon Sucks! I was promised my new phone tomorrow (6/12/13) and tracking shows that the order was not even picked up till today (6/11/13). This means it will not be here till Thursday. They also charge a 30.00 fee for updating phones and they don't tell you about this. As a matter of fact when I told them they didn't tell me when I ordered, they said they are not required to tell people. Additionally, when my daughter upgraded her phone they didn't tell her that she was going to lose her unlimited data plan. I called them to tell them I was not getting my phone on the date they promised (6/12, ordered 6/9), and they said everything was done correctly on their side and I should called Fex ed. We know how that ended? Fed Ex told me they were not called to pick it up until today (6/11) when I ordered it on Sunday. Just beware of Verizon!

    Upgrade fee has been around since April 2012. That's 14 months ago. It's posted on this website when you upgrade a phone and also listed on the price of phones when buying at a Verizon store. It also made all the major news sources when announced and was posted on this site. For the record at&t would have charged you $36 to upgrade and Sprint would have charged you $38. T-mobile doesn't even give discount upgrades anymore they force you to pay full price.
    As far as losing the unlimited data. This policy has been in place since June 28th 2012. It made all the major news sources and was also posted on this site. Doesn't matter as Verizon will like end unlimited data for all within a year.

  • Getting Delayed Voicemails

    I'm getting new voicemails delayed from hours later to a day later from the missed call. What should I do? I am also getting voicemails that I have deleted reappearing in my voicemail box.

    Voice mail is handled by your carrier so call them and see if there is an issue with your Voice Mail box. There are special things they do on their end for iPhone users so may not be fully correct.
    They can always reset it for you (though you will lose anything you have saved).

  • New Filed in ME5A & ME2M

    Hi
    i want to add a new field in ME5A
    i.e Number of Delayed Days
    values inthat filed should be
    Number of Delayed Days = PR Creation date - PO Creation date....
    usage : User wants to know Number of Delayed Days for Generation PO......
    I need a Ztode like ZME5A.....
    How to do  this ???
    similer i have one more requirement
    ME2M should copied to ZME2M
    same i want add new filed Delayed days
    Number of Delayed Days =  PO Creation date - GR Created date...
    Regards
    Ramesh

    Ramesh:
    Could you please stop posting question and answered them yourself if you're not going to share the answers?
    Sorry but it's getting kinda annoying...
    Greetings,
    Blag.

  • MultiCast sending the String with delay 5s.

    Dear all
    I had written a program that multicast-sends a string every five seconds to the multicast group 234.5.6.7 on port 8111. The string to be sent is obtained by the following statement: String str = (new Information()).toString() and is as following:
    import java.io.*;
    import java.net.*;
    import javax.swing.*;
    import javax.swing.Timer;
    import java.awt.event.ActionListener;
    public class Multicast implements ActionListener {
       public static void main(String args[]) {
        try {
          String str = new Information().toString();
          InetAddress group = InetAddress.getByName("234.5.6.7");
          MulticastSocket s = new MulticastSocket(8111);
          s.joinGroup(group);
          DatagramPacket hi = new DatagramPacket(str.getBytes(), str.length(), group, 8111);
          int delay = 5000; //milliseconds
          ActionListener taskPerformer = new ActionListener();
          new Timer(delay, taskPerformer).start();
          s.leaveGroup(group);
         } catch (Exception e) {
          System.out.println(e);     
        public void actionPerformed(ActionEvent evt) {
           s.send(hi);
    }When I complie the program, the 5 errors would be happened. In addition, "s" isn't defination. But I don't understand what can I do. Would you mind help me? Thanks for you help.
    In addition, we assume that the class "Information" would be written with toString method.
    Billy

    Thanks for your reply.
    The errors of the program is as following:
    Multicast.java:24: cannot resolve symbol
    symbol : class ActionEvent
    location: class Multicast
    public void actionPerformed(ActionEvent evt) {
    ^You need to import ActionEvent.
    event.ActionListener is abstract; cannot be
    instantiated
    ActionListener taskPerformer = new
    ActionListener();
    ^You should not instantiate ActionListener, you should Instantiate your class instead (the class that implements ActionListener)
    symbol : variable hi
    location: class Multicast
    s.send(hi);
    ^
    st.java:25: cannot resolve symbol
    symbol : variable s
    location: class Multicast
    s.send(hi);
    ^
    4 errors
    Thanks for your help.hi and s are not known within the actionPerformed method.
    Kaj

  • I want to use the new graphics declarations to draw a bunch of 5px wide circles onto this canvas

    I'm learning this FB 2 IDE.
    Could someone help me out here for a project I want to do.
    Basically what I have is this
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                    xmlns:mx="library://ns.adobe.com/flex/halo" layout="absolute" minWidth="1024" minHeight="768" width="432" height="382">
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
        <mx:Canvas width="100%" height="100%" backgroundColor="#FFFFFF">
        </mx:Canvas>
    </mx:Application>
    I want to use the new graphics declarations to draw a bunch of 5px wide circles onto this canvas but I don't know how. I want to evalve this into a strategy game
    Any code tips would be appreciated
    Is Canvas the best choice to draw stuff onto?
    looking forward to your input and help as this app grows

    Thanks very much so far, awesome code:)
    I now have added some animation and logic.
    If compile this and press start animation you will see what I mean
    I would now like to draw a line from every gray ellipse to every blue ellipse but am not sure of the best way to do this using fxg.(connecting centers and behind the ellipsis)
    Would love some expert advice
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/halo">
        <s:creationComplete>
            <![CDATA[
            setupScene();
            ]]>
        </s:creationComplete>
        <s:controlBarContent>
            <s:Button label="start Animation"
                      buttonDown="startAnimation();" />
            <s:Button label="stop Animation"
                      buttonDown="stopAnimation();" />
        </s:controlBarContent>
        <fx:Script>
            <![CDATA[
                import mx.collections.ArrayCollection;
                import mx.core.IVisualElement;
                import mx.graphics.SolidColor;
                private var FPS:uint = 20;
                private var delay:uint = 1000/ FPS;
                private var repeat:uint = 100;
                private var myTimer:Timer = new Timer(delay, repeat);
                private var blueTeam:ArrayCollection =  new ArrayCollection();
                private var blueLeaders:ArrayCollection =  new ArrayCollection();
                private function startAnimation():void{
                    myTimer.addEventListener("timer", updateState);
                    myTimer.start();
                private function stopAnimation():void{
                    myTimer.stop();
                protected function setupScene():void {
                    for (var i :int = 0;i< 8;i++){
                        var c:bCirc = new bCirc();
                        c.x = uint(Math.random() * 400); // random X position
                        c.y = uint(Math.random() * 300); // random Y position
                        blueTeam.addItem(c);
                    for (i = 0;i< 2;i++){
                        var c2:bLeader = new bLeader();
                        c2.x = uint(Math.random() * 400); // random X position
                        c2.y = uint(Math.random() * 300); // random Y position
                        blueTeam.addItem(c2);
                private function updateState(event:Event):void{
                    for each (var o:IVisualElement  in blueTeam ){
                        o.x ++;
                    for each (o  in blueLeaders ){
                        o.x ++;
                    render();
                private function render():void{
                    //clear all items from displaylist
                    removeAllElements();
                    for each (var o:IVisualElement in blueTeam ){
                        addElement(o );
            ]]>
        </fx:Script>
        <fx:Declarations>
            <fx:Component className="bCirc">
                <s:Ellipse width="30" height="30" alpha="0.8">
                    <s:fill>
                        <s:SolidColor color="0x0000ff" />
                    </s:fill>
                </s:Ellipse>
            </fx:Component>
            <fx:Component className="bLeader">
                <s:Ellipse x="0" y="0" width="30" height="30">
                    <s:fill>
                        <s:LinearGradient x="0" y="0" rotation="90">
                            <s:entries>
                                <s:GradientEntry color="#FFFFFF" ratio="0" alpha="1" />
                                <s:GradientEntry color="#000000" ratio="1" alpha="1" />
                            </s:entries>
                        </s:LinearGradient>
                    </s:fill>
                </s:Ellipse>
            </fx:Component>
            <fx:Component className="RCirc">
                <s:Ellipse width="30" height="30" alpha="0.8">
                    <s:fill>
                        <s:SolidColor color="0xff0000" />
                    </s:fill>
                </s:Ellipse>
            </fx:Component>
        </fx:Declarations>
    </s:Application>

  • Problem with JFrame and busy/wait Cursor

    Hi -- I'm trying to set a JFrame's cursor to be the busy cursor,
    for the duration of some operation (usually just a few seconds).
    I can get it to work in some situations, but not others.
    Timing does seem to be an issue.
    There are thousands of posts on the BugParade, but
    in general Sun indicates this is not a bug. I just need
    a work-around.
    I've written a test program below to demonstrate the problem.
    I have the problem on Solaris, running with both J2SE 1.3 and 1.4.
    I have not tested on Windows yet.
    When you run the following code, three JFrames will be opened,
    each with the same 5 buttons. The first "F1" listens to its own
    buttons, and works fine. The other two (F2 and F3) listen
    to each other's buttons.
    The "BUSY" button simply sets the cursor on its listener
    to the busy cursor. The "DONE" button sets it to the
    default cursor. These work fine.
    The "SLEEP" button sets the cursor, sleeps for 3 seconds,
    and sets it back. This does not work.
    The "INVOKE LATER" button does the same thing,
    except is uses invokeLater to sleep and set the
    cursor back. This also does not work.
    The "DELAY" button sleeps for 3 seconds (giving you
    time to move the mouse into the other (listerner's)
    window, and then it behaves just like the "SLEEP"
    button. This works.
    Any ideas would be appreciated, thanks.
    -J
    import java.awt.BorderLayout;
    import java.awt.Cursor;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.SwingUtilities;
    public class BusyFrameTest implements ActionListener
    private static Cursor busy = Cursor.getPredefinedCursor (Cursor.WAIT_CURSOR);
    private static Cursor done = Cursor.getDefaultCursor();
    JFrame frame;
    JButton[] buttons;
    public BusyFrameTest (String title)
    frame = new JFrame (title);
    buttons = new JButton[5];
    buttons[0] = new JButton ("BUSY");
    buttons[1] = new JButton ("DONE");
    buttons[2] = new JButton ("SLEEP");
    buttons[3] = new JButton ("INVOKE LATER");
    buttons[4] = new JButton ("DELAY");
    JPanel buttonPanel = new JPanel();
    for (int i = 0; i < buttons.length; i++)
    buttonPanel.add (buttons);
    frame.getContentPane().add (buttonPanel);
    frame.pack();
    frame.setVisible (true);
    public void addListeners (ActionListener listener)
    for (int i = 0; i < buttons.length; i++)
    buttons[i].addActionListener (listener);
    public void actionPerformed (ActionEvent e)
    System.out.print (frame.getTitle() + ": " + e.getActionCommand());
    if (e.getActionCommand().equals ("BUSY"))
    frame.setCursor (busy);
    else if (e.getActionCommand().equals ("DONE"))
    frame.setCursor (done);
    else if (e.getActionCommand().equals ("SLEEP"))
    frame.setCursor (busy);
    try { Thread.sleep (3000); } catch (Exception ex) { }
    frame.setCursor (done);
    System.out.print (" finished");
    else if (e.getActionCommand().equals ("INVOKE LATER"))
    frame.setCursor (busy);
    SwingUtilities.invokeLater (thread);
    else if (e.getActionCommand().equals ("DELAY"))
    try { Thread.sleep (3000); } catch (Exception ex) { }
    frame.setCursor (busy);
    try { Thread.sleep (3000); } catch (Exception ex) { }
    frame.setCursor (done);
    System.out.print (" finished");
    System.out.println();
    Runnable thread = new Runnable()
    public void run()
    try { Thread.sleep (3000); } catch (Exception ex) { }
    frame.setCursor (done);
    System.out.println (" finished");
    public static void main (String[] args)
    BusyFrameTest f1 = new BusyFrameTest ("F1");
    f1.addListeners (f1);
    BusyFrameTest f2 = new BusyFrameTest ("F2");
    BusyFrameTest f3 = new BusyFrameTest ("F3");
    f2.addListeners (f3); // 2 listens to 3
    f3.addListeners (f2); // 3 listens to 2

    I've had the same problems with cursors and repaints in a swing application, and I was thinking of if I could use invokeLater, but I never got that far with it.
    I still believe you would need a thread for the time consuming task, and that invokeLater is something you only need to use in a thread different from the event thread.

  • Game of Life display problem

    The Rules of Game of Life
    For a space that is 'populated':
    Each cell with one or no neighbors dies, as if by loneliness.
    Each cell with four or more neighbors dies, as if by overpopulation.
    Each cell with two or three neighbors survives.
    For a space that is 'empty' or 'unpopulated'
    Each cell with three neighbors becomes populated.
    I have three classes: Cell, BoardComponent, and GameViewer
    I got few problems in my code: 1. the button shows wrongly, 2. without the button, there is always a dot on the upper-left corner, which is not on purpose, 3, after click the mouse to initialize few dots, nothing happened
    How could I fix those problems?
    My Code:
    1. Cell:
    import java.awt.Rectangle;
    public class Cell extends Rectangle{
         public Cell(int x, int y, int side)
              super(x, y, side, side);
    }2. BoardComponent:
    import java.awt.Color;
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    import javax.swing.JComponent;
    import com.sun.jdi.event.Event;
    public class BoardComponent extends JComponent{
         public BoardComponent()
              for(int i = 0; i < ROW; i++)
                   for(int j = 0; j < COL; j++)
                        board[i][j] = new Cell(i*SIDE, j*SIDE, SIDE);
         public void paint(Graphics g)
              Graphics2D g2 = (Graphics2D)g;
              for(int i = 0; i < ROW; i++)
                   for(int j = 0; j < COL; j++)
                        g2.draw(board[i][j]);
         public void initialize(int x, int y)
              Graphics g = getGraphics();
              Graphics2D g2 = (Graphics2D) g;
              if(g2.getColor().equals(Color.BLUE))
                   g2.getBackground();
              else
                   g2.setColor(Color.BLUE);
                   g.fillOval(mouseX, mouseY, 10, 10);
         public void generate()
              int count = 0;
              for(int i = 0; i < ROW-2; i++)
                   for(int j = 0; j < COL-2; j++)
                        for(int m = 0; m < 2; m++)
                             for(int n = 0; n < 2; n++)
                                  if(m!=0 || n !=0)
                                       if(!(board[i+m][j+n].isEmpty()))
                                            count++;
                        if(count == 3 || count < 2 || count > 4)
                             initialize(i*SIDE, j*SIDE);
         private int mouseX, mouseY;
         private boolean mouseclicked = false;
         public static final int ROW = 40;
         public static final int COL = 40;
         private Cell[][] board = new Cell[ROW][COL];
         public static final int SIDE = 14;
    }3. GameViewer:
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.event.MouseAdapter;
    import java.awt.event.MouseEvent;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.Timer;
    public class GameViewer extends JFrame{
         public static void main(String[] args)
              final BoardComponent game = new BoardComponent();
              class MouseClickListener extends MouseAdapter
                   public void mouseClicked(MouseEvent event)
                        int x = event.getX();
                        int y = event.getY();
                        game.initialize(x, y);
              MouseAdapter listener = new MouseClickListener();
              game.addMouseListener(listener);
              JButton button = new JButton("Start");
             class TimerListener implements ActionListener
                   public void actionPerformed(ActionEvent event)
                        game.generate();
            ActionListener timer = new TimerListener();
            button.setSize(40, 10);
            button.setLocation(250, 500);
            button.addActionListener(timer);
            final int DELAY = 500;
            Timer t = new Timer(DELAY, timer);
            t.start();  
            JFrame window = new JFrame();
            window.setSize(600, 600);
            window.setTitle("Life of Game");
            window.setDefaultCloseOperation(EXIT_ON_CLOSE);
            window.add(game);
            window.add(button);
            window.setVisible(true);
    }Thanks a million.

    As already said, you should override paintComponent(), not paint(), and don't forget to call the superclass's paintComponent() method.
    public void paintComponent(Graphics g)
       super.paintComponent(g);
    }As for this method:
         public void initialize(int x, int y)
              Graphics g = getGraphics();
              Graphics2D g2 = (Graphics2D) g;
              if(g2.getColor().equals(Color.BLUE))
                   g2.getBackground();
              else
                   g2.setColor(Color.BLUE);
                   g.fillOval(mouseX, mouseY, 10, 10);
         }You really shouldn't be doing any painting outside the paintComponent() method.
    Finally, your GameViewer class extends JFrame, but yet you are creating another JFrame in the main method. This doesn't make sense.

  • Swing timer, setDealy issue in bouncing balls

    Hi!
    I have a problem with an assignment with bouncing footballs. There are three classes; footBall which picks a football (soccer)from referencelibrary and here I have a swing timer. The next class is footballfield(fotBollsPlan) that also has a timer in it and an arraylist for the footballs. Here I also have a mouseListener, so every time I click on the footballfield I create a new football. And finally a main-class. So, I click on the panel and create footballs that starts to bounc around inside the frame. Here is the code:
    Football class:
    code
    package uppgift2;
    import java.awt.*;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.lang.Thread;
    import java.net.URL;
    import javax.swing.*;
    public class FotBoll implements ActionListener{
         private final int storlek;
         private int x;
         private int xfart;
         private int y;
         private int yfart;
         private FotBollsPlan plan;
         public FotBoll (int x, int y, int xfart, int yfart, int storlek){
              this.storlek = storlek;
              this.x = x;
              this.y = y;
              this.xfart = xfart;
              this.yfart = yfart;
              plan = new FotBollsPlan();
              Timer t = new Timer(100, this);
              t.start();
         public void actionPerformed(ActionEvent ae){
                   if (x < 0 || x > 700)
                        xfart = - xfart;
                   if (y < 0 || y > 500)
                        yfart = - yfart;
                   x = xfart + x;
                   y = yfart + y;
         public void rita(Graphics g){
              ClassLoader cl = this.getClass().getClassLoader();
              URL url = cl.getResource("fotboll" + storlek + ".png");
              Image im = (new javax.swing.ImageIcon(url)).getImage();
              g.drawImage(im, x, y, null );
    Footballfield class:code
    package uppgift2;
    import java.awt.*;
    import java.lang.Thread;
    import java.awt.event.*;
    import static javax.swing.JLabel.*;
    import javax.swing.*;
    public class FotBollsPlan extends JPanel implements MouseListener, ActionListener{
         private java.util.List<FotBoll>fotbollsObjekt;
         private int nrOfBalls;
         private int delay;
         private int loopslot;
         private Timer t;
         private JLabel label = new JLabel();
         public FotBollsPlan(){
         fotbollsObjekt = new java.util.ArrayList<FotBoll>();
         delay = 50;
         t = new Timer(delay, this);
         t.start();
         addMouseListener(this);
    public void paintComponent(Graphics g){
              super.paintComponent(g);
              for (FotBoll fb : fotbollsObjekt){
                   fb.rita(g);
              System.out.println("rita : " + fotbollsObjekt.size());
         public void actionPerformed(ActionEvent ae){
              // An ActionEvent from the timer so we let the timer repaint
              loopslot++;
              System.out.println("loopslot: " + loopslot);
              if(loopslot == 50){
                   //t.stop();
                   delay = 3000;
                   t.setDelay(delay);
                   t.restart();
                   System.out.println("DELAY: " + t.getDelay());
                   repaint();
                   loopslot = 0;
                   System.out.println("XXXX - if sats: " + loopslot);
                   //t.stop();
                   if(delay == 3000){
                        delay = 50;
                   t.setDelay(delay);
                   t.restart();
                   System.out.println("DELAY: " + t.getDelay());
                   //System.out.println("InitialDELAY: " + t.getInitialDelay());
                   repaint();
         public void mouseClicked(MouseEvent me){
              int xfart = (int)(Math.random()*50) - 2;
              int yfart = (int)(Math.random()*50) - 2;
              int storlek = (int)(Math.random()*10) + 1;
              if (me.getButton()== MouseEvent.BUTTON1){
                   FotBoll fb = new FotBoll(me.getX(), me.getY(),xfart, yfart, storlek);
                   fotbollsObjekt.add(fb);
         public void mouseEntered(MouseEvent me) {}
         public void mouseExited(MouseEvent me) {}
         public void mousePressed(MouseEvent me) {}
         public void mouseReleased(MouseEvent me) {}
    code
    code
    Main:
    package uppgift2;
    import java.awt.*;
    import java.awt.event.*;
    import java.net.URL;
    import javax.swing.*;
    public class FotBollMain extends JFrame {
         private FotBoll fb;
         private FotBollsPlan plan1;
    public FotBollMain(){
              setTitle("Test av FotBollsPlan");
              setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              ClassLoader cl = this.getClass().getClassLoader();
              URL url = cl.getResource("fotbollsplan.png");
                        JLabel label = new JLabel(new ImageIcon(url));
              label.setLayout(new GridLayout(1,1));
                        setSize(800, 600);
              setLocation(25, 25);
                        plan1 = new FotBollsPlan();
              plan1.add(label);
                        add(plan1, BorderLayout.CENTER);
                        setVisible(true);
         public static void main(String[] args)
                        FotBollMain test = new FotBollMain();
    code
    Everything works fine when clicking on the panel and the balls starts to bounce around. But in evenly intervalls the panel should "freeze" for a couple of seconds - showing(painting ) all the balls and then go back again bouncing around. I try to setDelay to 3000 ms which means that for this period of time the panel is "frozen" and then setDelay 50 ms, ie the balls should start bouncing around again. But this doesn't work out. This is the actionPerformed method in the class FotBollsPlan. As you understand I've tried different scenarios but I just can't figure out how to get this to work. The way the code works right now is that if I create four balls, they will all be representing an event and I seem to setDelay for every event not the whole Timer. Does anyone understand this?
    By the way, I don't understand the codetags here.
    Anders

    Hi!
    I have a problem with an assignment with bouncing footballs. There are three classes; footBall which picks a football (soccer)from referencelibrary and here I have a swing timer. The next class is footballfield(fotBollsPlan) that also has a timer in it and an arraylist for the footballs. Here I also have a mouseListener, so every time I click on the footballfield I create a new football. And finally a main-class. So, I click on the panel and create footballs that starts to bounc around inside the frame. Here is the code:
    Football class:
    code
    package uppgift2;
    import java.awt.*;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.lang.Thread;
    import java.net.URL;
    import javax.swing.*;
    public class FotBoll implements ActionListener{
         private final int storlek;
         private int x;
         private int xfart;
         private int y;
         private int yfart;
         private FotBollsPlan plan;
         public FotBoll (int x, int y, int xfart, int yfart, int storlek){
              this.storlek = storlek;
              this.x = x;
              this.y = y;
              this.xfart = xfart;
              this.yfart = yfart;
              plan = new FotBollsPlan();
              Timer t = new Timer(100, this);
              t.start();
         public void actionPerformed(ActionEvent ae){
                   if (x < 0 || x > 700)
                        xfart = - xfart;
                   if (y < 0 || y > 500)
                        yfart = - yfart;
                   x = xfart + x;
                   y = yfart + y;
         public void rita(Graphics g){
              ClassLoader cl = this.getClass().getClassLoader();
              URL url = cl.getResource("fotboll" + storlek + ".png");
              Image im = (new javax.swing.ImageIcon(url)).getImage();
              g.drawImage(im, x, y, null );
    Footballfield class:code
    package uppgift2;
    import java.awt.*;
    import java.lang.Thread;
    import java.awt.event.*;
    import static javax.swing.JLabel.*;
    import javax.swing.*;
    public class FotBollsPlan extends JPanel implements MouseListener, ActionListener{
         private java.util.List<FotBoll>fotbollsObjekt;
         private int nrOfBalls;
         private int delay;
         private int loopslot;
         private Timer t;
         private JLabel label = new JLabel();
         public FotBollsPlan(){
         fotbollsObjekt = new java.util.ArrayList<FotBoll>();
         delay = 50;
         t = new Timer(delay, this);
         t.start();
         addMouseListener(this);
    public void paintComponent(Graphics g){
              super.paintComponent(g);
              for (FotBoll fb : fotbollsObjekt){
                   fb.rita(g);
              System.out.println("rita : " + fotbollsObjekt.size());
         public void actionPerformed(ActionEvent ae){
              // An ActionEvent from the timer so we let the timer repaint
              loopslot++;
              System.out.println("loopslot: " + loopslot);
              if(loopslot == 50){
                   //t.stop();
                   delay = 3000;
                   t.setDelay(delay);
                   t.restart();
                   System.out.println("DELAY: " + t.getDelay());
                   repaint();
                   loopslot = 0;
                   System.out.println("XXXX - if sats: " + loopslot);
                   //t.stop();
                   if(delay == 3000){
                        delay = 50;
                   t.setDelay(delay);
                   t.restart();
                   System.out.println("DELAY: " + t.getDelay());
                   //System.out.println("InitialDELAY: " + t.getInitialDelay());
                   repaint();
         public void mouseClicked(MouseEvent me){
              int xfart = (int)(Math.random()*50) - 2;
              int yfart = (int)(Math.random()*50) - 2;
              int storlek = (int)(Math.random()*10) + 1;
              if (me.getButton()== MouseEvent.BUTTON1){
                   FotBoll fb = new FotBoll(me.getX(), me.getY(),xfart, yfart, storlek);
                   fotbollsObjekt.add(fb);
         public void mouseEntered(MouseEvent me) {}
         public void mouseExited(MouseEvent me) {}
         public void mousePressed(MouseEvent me) {}
         public void mouseReleased(MouseEvent me) {}
    code
    code
    Main:
    package uppgift2;
    import java.awt.*;
    import java.awt.event.*;
    import java.net.URL;
    import javax.swing.*;
    public class FotBollMain extends JFrame {
         private FotBoll fb;
         private FotBollsPlan plan1;
    public FotBollMain(){
              setTitle("Test av FotBollsPlan");
              setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              ClassLoader cl = this.getClass().getClassLoader();
              URL url = cl.getResource("fotbollsplan.png");
                        JLabel label = new JLabel(new ImageIcon(url));
              label.setLayout(new GridLayout(1,1));
                        setSize(800, 600);
              setLocation(25, 25);
                        plan1 = new FotBollsPlan();
              plan1.add(label);
                        add(plan1, BorderLayout.CENTER);
                        setVisible(true);
         public static void main(String[] args)
                        FotBollMain test = new FotBollMain();
    code
    Everything works fine when clicking on the panel and the balls starts to bounce around. But in evenly intervalls the panel should "freeze" for a couple of seconds - showing(painting ) all the balls and then go back again bouncing around. I try to setDelay to 3000 ms which means that for this period of time the panel is "frozen" and then setDelay 50 ms, ie the balls should start bouncing around again. But this doesn't work out. This is the actionPerformed method in the class FotBollsPlan. As you understand I've tried different scenarios but I just can't figure out how to get this to work. The way the code works right now is that if I create four balls, they will all be representing an event and I seem to setDelay for every event not the whole Timer. Does anyone understand this?
    By the way, I don't understand the codetags here.
    Anders

  • Java.util.Timer and java.util.TimerTask running threads problem

    Hi,
    I have following scenario.
    1. My thread to send mail has to run at a fixed time interval thus I am using the following method from the Timer class.
    scheduleAtFixedRate(TimerTask object, start time, interval)
    2. My thread in the class checkDBSendEmail that extends TimerTask class reads database and sends mail based on the data received in the run() method.
    3. Whenever I send any mail, I log it into a database table that keeps the record of the emails sent.
    4. i have put it some logic to filter data form data base after that it will sends me unique data. Data should be email to different uses based on the list.
    Now the Problem:
    I am receiving duplicate mails on multiple times.
    Is there anything that I am missing in the following that would help me resolve this problem.
    my Servlet inti method is:

    sorry code is here..........
    public class SchduleTimeEmail extends HttpServlet implements SingleThreadModel{
    public void init( ServletConfig servletConfig ) throws ServletException{
    super.init(servletConfig);
    this.config = servletConfig;
    try{
    // specify in the format as in 12.13.52 or 3:30pm
    initialTime = format.parse( config.getInitParameter("initialTime"));
    delay = HOURS_24;
    RunLogger.addLogger("init first try:"); // log file
    catch( ParseException pe ){
    // Log.sendMessage( Log.MESSAGE_LEVEL_INFO , "[TimerServlet]", "startTime could not be parsed from web.xml file" );
    System.out.println("startTime could not be parsed from web.xml file."+pe);
    initialTime = new Date();
    delay = HOURS_24;
    // Timer Must start combination of 15,30,45,00 min for check schdule
    Date dalayTimeMinSec = new Date();
    int currentMin = dalayTimeMinSec.getMinutes();
    int totalDelayTime = 0;
    if(currentMin%15!=0 || currentMin%15 != 15){
    try {
    int delayMin = currentMin % 15;
    totalDelayTime = (15-delayMin) * 1000 * 60;
    dalayTimeMinSec.setSeconds(0);
    Thread.sleep(totalDelayTime);
    RunLogger.addLogger("Thread go for sleep:");
    } catch (InterruptedException ex) {
    RunLogger.addLogger(ex.toString());
    //Start Timer from this time
    timer = new Timer();
    Calendar time = Calendar.getInstance();
    Calendar timeOfDay = Calendar.getInstance();
    try{
    timeOfDay.setTime(initialTime);
    time.set((Calendar.HOUR_OF_DAY), timeOfDay.get(Calendar.HOUR_OF_DAY));
    time.set(Calendar.MINUTE, timeOfDay.get(Calendar.MINUTE));
    time.set(Calendar.SECOND, timeOfDay.get(Calendar.SECOND));
    Calendar startTimeOfTimer = Calendar.getInstance();
    startTimeOfTimer.add( Calendar.MINUTE, 0 );
    // make sure the first timer doesn't fire before the server starts
    if( time.before(startTimeOfTimer) )
    time = startTimeOfTimer;
    System.out.println("TimerServlet: Timer has been set for " + time.getTime() + " '(" + delay + ")'"); // for checking
    checkDBSendEmail msasTask = new checkDBSendEmail();
    timer.scheduleAtFixedRate( msasTask, time.getTime(), delay );
    catch( Exception e ){
    RunLogger.addLogger(e.toString());
    public void destroy(){
    timer.cancel();
    super.destroy();
    and another class is:..
    public class checkDBSendEmail extends TimerTask{
    public void run()
    // System.out.println("Function run : "+ functionExcuteCount++);
    try{
    // DB Logic as well as send e-mail function call
    catch( Exception ex ){
    RunLogger.addLogger(ex.toString());
    protected void doGet(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    processRequest(request, response);
    protected void doPost(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    processRequest(request, response);
    public String getServletInfo() {
    return "Short description";
    // </editor-fold>
    I also checked the email server settings, and I am sure that the email server is not duplicating the emails.
    this code working correctly on my local machine But in live server it duplicating email and still I am receiving duplicate mails.
    Any help is appreciated.
    Thanks,
    Sharda

  • Problem with Double Buffering and Swing

    Hi
    I made a game and basically it works pretty well, my only problem is it flickers really badly right now. I read up on a whole lot of forums about double buffering and none of those methods seemed to work. Then I noticed that Swing has double buffering built in so I tried that but then I get compilation errors and I'm really not sure why. My original code was a console application and worked perfectly, then I ported it into a JApplet and it still works but it flickers and thats what I'm tryign to fix now.
    The code below is in my main class under the constructor.
    Heres the double buffering code I'm trying to use, I'm sure you all seen it before lol
    public void update(Graphics g)
              // initialize buffer
              if (dbImage == null)
                   dbImage = createImage(this.getSize().width, this.getSize().height);
                   dbg = dbImage.getGraphics();
              // clear screen in background
              dbg.setColor(getBackground());
              dbg.fillRect(0, 0, this.getSize().width, this.getSize().height);
              // draw elements in background
              dbg.setColor(getForeground());
              paint(dbg);
              // draw image on the screen
              g.drawImage(dbImage, 0, 0, this);
         }My paint is right under neath and heres how it looks
    This snipet of code works but when I change the method to
    public paintComponent(Graphics g){
    super.paintComponent(g)...
    everythign stops working and get a compilation error and says that it can't find paintComponent in javax.swing.JFrame.
    public void paint(Graphics g)
              super.paint(g);
              //if game starting display menue
              if (show_menue)
                   //to restart lives if player dies
                   lives = 3;
                   menue.draw_menue(g);
                   menue_ufo1.draw_shape(g);
                   menue_ufo2.shape_color = Color.DARK_GRAY;
                   menue_ufo2.draw_shape(g);
                   menue_ufo3.shape_color = Color.BLUE;
                   menue_ufo3.draw_shape(g);
                   menue_ufo4.shape_color = new Color(82, 157, 22);
                   menue_ufo4.draw_shape(g);
                   menue_ufo5.draw_shape(g);
                   menue_ufo6.shape_color = new Color(130, 3, 3); ;
                   menue_ufo6.draw_shape(g);
                   menue_turret.draw_ship(g);
                   menue_ammo.draw_ammo(g);
              else
                   //otherwise redraw game objects
                   gunner.draw_ship(g);
                   y_ammo.draw_ammo(g);
                   grass.draw_bar(g);
                   o_ufo.draw_shape(g);
                   b_ufo.draw_shape(g);
                   m_ufo.draw_shape(g);
                   s_ufo.draw_shape(g);
                   z_ufo.draw_shape(g);
                   xx_ufo.draw_shape(g);
                   info.draw_bar(g);
                   live_painter.draw_lives(g, lives);
                   score_painter.draw_score(g, score);
                   level_display.draw_level(g, level);
                   explosion.draw_boom(g);
         }I just want to get rid of the flickering for now so any help will be greatly appreciated. Depending which will be simpler I can either try to double buffer this program or port it all to swing but I'm not sure which elements are effected by AWT and which by Swing. Also I read some of the Java documentation but couldn't really understand how to implement it to fix my program.
    Thanks in advance
    Sebastian

    This is a simple animation example quickly thrown together. I have two classes, an animation panel which is a JPanel subclass that overrides paintComponent and draws the animation, and a JApplet subclass that simply holds the animation panel in the applet's contentpane:
    SimpleAnimationPanel.java
    import java.awt.Dimension;
    import java.awt.Graphics;
    import java.awt.Point;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.image.BufferedImage;
    import java.io.IOException;
    import java.net.MalformedURLException;
    import java.net.URL;
    import javax.imageio.ImageIO;
    import javax.swing.JPanel;
    import javax.swing.Timer;
    class SimpleAnimationPanel extends JPanel
        private static final int DELAY = 20;
        public static final int X_TRANSLATION = 2;
        public static final int Y_TRANSLATION = 2;
        private Point point = new Point(5, 32);
        private BufferedImage duke = null;
        private Timer timer = new Timer(DELAY, new TimerAction());
        public SimpleAnimationPanel()
            try
                // borrow an image from sun.com
                duke = ImageIO.read(new URL(
                        "http://java.sun.com/products/plugin/images/duke.wave.med.gif"));
            catch (MalformedURLException e)
                e.printStackTrace();
            catch (IOException e)
                e.printStackTrace();
            setPreferredSize(new Dimension(600, 400));
            timer.start();
        // do our drawing here in the paintComponent override
        @Override
        protected void paintComponent(Graphics g)
            super.paintComponent(g);
            if (duke != null)
                g.drawImage(duke, point.x, point.y, this);
        private class TimerAction implements ActionListener
            @Override
            public void actionPerformed(ActionEvent e)
                int x = point.x;
                int y = point.y;
                Dimension size = SimpleAnimationPanel.this.getSize();
                if (x > size.width)
                    x = 0;
                else
                    x += X_TRANSLATION;
                if (y > size.height)
                    y = 0;
                else
                    y += Y_TRANSLATION;
                point.setLocation(new Point(x, y)); // update the point
                SimpleAnimationPanel.this.repaint();
    }AnimationApplet.java
    import java.lang.reflect.InvocationTargetException;
    import javax.swing.JApplet;
    import javax.swing.JPanel;
    import javax.swing.SwingUtilities;
    public class AnimationApplet extends JApplet
        public void init()
            try
                SwingUtilities.invokeAndWait(new Runnable()
                    public void run()
                        // construct the panel
                        JPanel simpleAnimation = new SimpleAnimationPanel();
                        // put it in the contentPane of the JApplet
                        getContentPane().add(simpleAnimation);
                        setSize(simpleAnimation.getPreferredSize());
            catch (InterruptedException e)
                e.printStackTrace();
            catch (InvocationTargetException e)
                e.printStackTrace();
    }Here's a 3rd bonus class that shows how to put the JPanel into a stand-alone program, a JFrame. It's very similar to doing it in the JApplet:
    AnimationFrame.java
    import javax.swing.JFrame;
    public class AnimationFrame
        private static void createAndShowUI()
            JFrame frame = new JFrame("SimpleAnimationPanel");
            frame.getContentPane().add(new SimpleAnimationPanel());
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.pack();
            frame.setLocationRelativeTo(null);
            frame.setVisible(true);
        public static void main(String[] args)
            java.awt.EventQueue.invokeLater(new Runnable()
                public void run()
                    createAndShowUI();
    }Edited by: Encephalopathic on Mar 15, 2008 11:01 PM

Maybe you are looking for

  • Netboot logins conflict with real users - can I change the range?

    I'm starting to try to get Netboot/Netinstall up and working. I notice that it has gone and set up a bunch of logins like netboot101, netboot102, etc. using UID 101, 102, etc. The only problem is that we already have real users with these UIDs, as we

  • External Hard Drive has failed!! How do I get a copy of my Photos off Apple

    My Western Digital external hards drive has failed. None of the data can be recovered. I basically held my music & photo collection. Most off my music is still on my iMac so no problem there. However, I has moved my entire photo collection onto the E

  • B/W odd crash

    hiya i recently got a G3 Tower, and i put 10.3 on it. its got 2 HDDs a 10 (for booting) and a 120 for stuff. Some times i am working in firefox or any other app i get a message that my computer must be restarted, ive not seen this before can anyone h

  • Aspect ratio on DivX movies

    I'm having a few issues with the correct aspect ratio not being reproduced in Quicktime when watchting a DivX. When viewing in VLC Player everything is correct. For example I have a movie with a size of 852x368 but in Quicktime it's 720x368. The funn

  • Need Advice on Best Router to Connect to Fios Actiontec M1424WR

    From reading several of the postings I too want to connect a second router to my network to increase my connections speeds.  Currently I have fios 35/35 but of course I never reach such speeds wired or wireless.  So many routers are available but I w