Tuesday, 10 December 2013

Graphic java course Using byte Array in Applet [ Part 4]

Using byte Array




Full code
       

package javacourse;

package javacourse;

import java.applet.Applet;
import java.awt.Color;
import java.awt.Graphics;


/**
 *
 * @author Backtrace
 */
public class TestApplet extends Applet{

    byte[] b={109,97,109,115,116,114,105,99,107,115};
  
    public void init()
    {
       setBackground(Color.red);
    
    }
    
    public void paint (Graphics g){
      
         g.setColor(Color.yellow);
         g.drawBytes(b,0, b.length, 10, 150);
  
        }
}
        
    


0 Comments:

Post a Comment

Facebook Twitter Delicious Digg Stumbleupon Favorites More

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | coupon codes