Using byte Array
Full code
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