aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes overwriting paintTrack(Graphics g) - help drawing a line Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "overwriting paintTrack(Graphics g) - help drawing a line" Watch "overwriting paintTrack(Graphics g) - help drawing a line" New topic
Author

overwriting paintTrack(Graphics g) - help drawing a line

olze oli
Ranch Hand

Joined: Jun 20, 2009
Posts: 148
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

Joined: Jun 13, 2009
Posts: 2182
    
    7
The fillRect(...) method should work.
olze oli
Ranch Hand

Joined: Jun 20, 2009
Posts: 148
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

Joined: Oct 27, 2005
Posts: 19696
    
  20

Check out all the nifty methods java.awt.Graphics has.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: overwriting paintTrack(Graphics g) - help drawing a line