title: How to Create a travelling sine wave movement with `jradiobutton `
body: <p>I am using NetBeans8 IDE .</p>
  
  <p><a href="http://jsfiddle.net/twNcy/5/" rel="nofollow">Here is a fiddle by a programmer.</a></p>
  
  <p>Here he create a sine wave movement with a box using <code>javascript</code>.After a long search I get the equation for SINE wave.But I tried a lot,But I cant get any result.</p>
  
  <p>y = sin (kx − ωt)</p>
  
  <p>My question is,</p>
  
  <p>How create such travelling wave effect using a <code>jcomponent</code> like <code>JRadiobutton</code> </p>
  
  <p>or </p>
  
  <p>how we create the <code>x</code> and <code>y</code> co ordinates using this equation from -<a href="http://www.animations.physics.unsw.edu.au/jw/travelling_sine_wave.htm" rel="nofollow">ThisPHYSCLIPS Webpage</a></p>
  
  <p>Kindly help me to solve this..Thanks in advance.</p>
  
  <p>Here is my bit of code</p>
  
  <pre><code>Timer t = new Timer(10, new ActionListener() {                                                                                           //        |
                                                                                                                                          //        |
      @Override                                                                                                                           //        |
      public void actionPerformed(ActionEvent e) {            
  
  
              int xnow=AL1.getX()+1;
              int ynow=AL1.getY();
              ynow=(int) (ynow+Math.sin(2*Math.PI*(xnow/50))*10);
  
              AL1.setLocation(xnow, ynow);
          }                                                                                                                            //        |       
  
  
  });  
  
  
  private void formWindowOpened(java.awt.event.WindowEvent evt) {                                  
      // TODO add your handling code here:
      AL1.setLocation(0, 200);
      t.start();
  }
  </code></pre>
  
  <p>But my <code>jRadioButton</code> is going some where..</p>