Search:

Type: Posts; User: Brain_Child

Search: Search took 0.07 seconds.

  1. Replies
    1
    Views
    4,947

    Re: centering a label inside a rectangle

    I tried replacing


    topLabel.getAscent()/2
    with

    (topLabel.getAscent()-topLabel.getDescent())/2

    and now the label looks centered. is this the proper method?
  2. Replies
    1
    Views
    4,947

    centering a label inside a rectangle

    hey,

    I'm trying to complete q3 from this pdf.

    http://www.stanford.edu/class/cs106a/handouts/13-assignment-2.pdf

    here is what ive written, so far it draws the middle line and the top box, but...
Results 1 to 2 of 2