Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

overwriting paintTrack(Graphics g) - help drawing a line

 
olze oli
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

i have just overwritten the paintTrack(Graphics g) method from the BasicSliderUI, but i have no idea how i could draw a nice line.
I can draw the line with g.drawLine(x1, y1, x2, y2) but that line is pretty thin and doesnt look good... how can i achieve this?

thanks in advance
 
Rob Camick
Ranch Hand
Posts: 2616
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The fillRect(...) method should work.
 
olze oli
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks, thats what i was looking for
is it possible to change the color (black is not really what i was looking for ;) )?
 
Rob Spoor
Sheriff
Pie
Posts: 20665
65
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out all the nifty methods java.awt.Graphics has.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic