Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protected void paint(Graphics g) {
- g.setColor(255, 255, 255);
- g.fillRect(0, 0, this.getWidth(), this.getHeight());
- //górny blue
- g.setColor(0, 0, 255);
- g.drawArc(60, 50, 50, 50,0, 360);
- // górny czarny
- g.setColor(0, 0, 0);
- g.drawArc(96, 50, 50, 50, 0, 360);
- //górny czerwony
- g.setColor(255, 0, 0);
- g.drawArc(132, 50, 50, 50, 0, 360);
- //dolny żółty
- g.setColor(255, 255, 0);
- g.drawArc(78, 70, 50, 50, 0, 360);
- //dolny zielony
- g.setColor(0, 255, 0);
- g.drawArc(114, 70, 50, 50, 0, 360);
- g.setColor(0, 0, 255);
- g.setFont(Font.getFont(Font.FACE_PROPORTIONAL, Font.STYLE_PLAIN, Font.SIZE_MEDIUM));
- g.drawString(napis, this.getWidth() / 2, this.getHeight() / 2, Graphics.BASELINE | Graphics.HCENTER);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement