Giter Site home page Giter Site logo

cube-art's Introduction

cube-art

package tektopsektrime; import java.applet.Applet; import java.awt.Color; import java.awt.Graphics; import java.util.logging.Level;

import javax.swing.JApplet;

public class TOPSEKTİRİME extends JApplet implements Runnable{ int karex=0,karey=0,r=40; Thread ciz;

public void run() {
   this.resize(500,300);
   while(this.getWidth()>karex+r){//birincisi
  karex+=10;
   repaint();
  try {
    Thread.sleep(50);
   } catch (InterruptedException ex) {
   }
   }
     while(this.getHeight()>karey+r){//ikincisi
           karey+=10;
           karey*=+1;
      
      try { repaint();
           Thread.sleep(30);
       } catch (InterruptedException ex) {
           Logger.getLogger(TOPSEKTİRİME.class.getName()).log(Level.SEVERE, null, ex);
       }
      if(this.getHeight()<=karey+r){karey*=-1;
      }
    
      repaint();
}}
public void paint(Graphics g){
    g.setColor(Color.red);
g.clearRect(0, 0,this.getSize().width, this.getSize().height);
g.fillRect(karex,karey,r,r);
}
public void start(){
if(ciz==null){
ciz=new Thread(this);
ciz.start();}

}
public void stop(){
    if(ciz!=null){
ciz.stop();

    }}

}

cube-art's People

Contributors

devrim0 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.