aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Brush function doesnt appear Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Brush function doesnt appear" Watch "Brush function doesnt appear" New topic
Author

Brush function doesnt appear

Miko Jing
Greenhorn

Joined: Dec 11, 2013
Posts: 5
in my paint program have brush function. It seem doesnt appear anything when select the brush function.

Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39885
    
  28
I never like listeners which test for their origin. Of course using the == operator on Strings is very likely to fail. Otherwise, don't know. I htink that is too much code to read.
Sam Gooding
Ranch Hand

Joined: Dec 06, 2013
Posts: 35
Because startPoint and endPoint are defined locally to the loop which you leave when you go on to process the "brush" part of paintComponent. They both therefore become null , and you only process your brush logic if they AREN'T null (which they are , because they're out of scope) .
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Brush function doesnt appear