0

circling text

hi, i need to know how to made this using loop in javafx. am i need to set the coordinate and rotation manually , or is there something i need to know to make the text circling neatly ?

here's my code so far :

int x = 0;
int y = 100;
int r = -50;
for(int i =0; i<=14; i++){
    Text text2 = new Text(x,y, ary[i]);
    text2.setRotate(r);
    pane.getChildren().add(text2);
    x=x+10;
    y=y-5;
    if(x<=90){
        x=x+10;
        y=y-5;
        r=r+5;
    }
    else if(x>=100){
        x = x-10;
        y = y+5;
        r = r+3;    
    }
}
Micaela
  • 132
  • 13
Jason
  • 109
  • 3
  • 14
  • Is it mandatory to use a loop, otherwise see http://stackoverflow.com/questions/17300457/how-to-write-text-along-a-bezier-curve and your question can dup of it. – Uluk Biy Sep 14 '15 at 09:11
  • unfortunately yes, its a practive given to me :( – Jason Sep 14 '15 at 13:53

0 Answers0