package mobileapplication9; import javax.microedition.lcdui.Canvas; import javax.microedition.lcdui.Font; import javax.microedition.lcdui.Graphics; /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ /** * * @author Bartosz */ public class Plotno extends Canvas { String napis; public Plotno() { napis = "Rio de Janeiro 2016"; } protected void paint(Graphics g) { g.setColor(255, 255, 255); g.fillRect(0, 0, this.getWidth(), this.getHeight()); g.setColor(0, 0, 255); g.drawArc(getWidth() / 2 - 40, getHeight() / 3, 30, 30, 0, 360); g.setColor(0, 0, 0); g.drawArc(getWidth() / 2 - 20, getHeight() / 3, 30, 30, 0, 360); g.setColor(255, 0, 0); g.drawArc(getWidth() / 2, getHeight() / 3, 30, 30, 0, 360); g.setColor(0, 255, 0); g.drawArc(getWidth() / 2 - 10, getHeight() / 3 + 20, 30, 30, 0, 360); g.setColor(255, 255, 0); g.drawArc(getWidth() / 2 - 30, getHeight() / 3 + 20, 30, 30, 0, 360); g.setColor(0, 0, 0); g.setFont(Font.getFont(Font.FACE_PROPORTIONAL, Font.STYLE_PLAIN, Font.SIZE_SMALL)); g.drawString(napis, this.getWidth() / 2, this.getHeight() / 2 + 40, Graphics.BASELINE | Graphics.HCENTER); } }