java - Double colored oval -


i bit new in java , have stuff homework. have make

enter image description here

the thing have no idea how make circle double colored yellow , black stuff. after use of threads have make rotate counter clock wise. here code circle, know how create it, don't know how multi color >.< .

import java.awt.*; import java.awt.event.*; import java.util.logging.logger;  import javax.swing.*; import javax.swing.border.titledborder; import javax.swing.jcombobox; import javax.swing.japplet; import javax.swing.jslider; import java.awt.color; import java.awt.graphics; import java.util.logging.level; import java.util.logging.logger; import javax.swing.japplet;  public class lab4a extends japplet implements runnable { public void init() {     thread t = new thread(this);     t.start(); }  public void paint(graphics g){     super.paint(g);     int w = getwidth();     int h = getheight();      g.drawoval(25, 35, 200, 200);     g.drawoval(45, 55, 160, 160); } 

}

have @ drawarc instead of drawoval. this, can paint arcs -- parts of ovals. can specify start , end angle of arc, can used drawing in different states when needs rotate.


Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -