Have to call setPaint instead of assigning to g.paint
-----------------------------------------------------

                 Key: JRUBY-2395
                 URL: http://jira.codehaus.org/browse/JRUBY-2395
             Project: JRuby
          Issue Type: Bug
          Components: Java Integration
    Affects Versions: JRuby 1.1RC3
         Environment: Windows XP SP2, JDK 1.5.0 update 15
            Reporter: Andrew Whitehouse
            Priority: Minor
             Fix For: JRuby 1.1RC3
         Attachments: test.rb

Implementing a custom component ...

class CustomComponent < JComponent

        def initialize
                @paint2 = GradientPaint.new( 0, 0, Color::BLACK, 0, 200, 
Color::WHITE )
        end

        def paintComponent(g)
                # g.setPaint( @paint2 )
                g.paint = @paint2
                g.fillRect( 0, 0, getWidth, getHeight )
        end
end

the above doesn't display the GradiantPaint component. However, when calling 
setPaint the class behaves as expected.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to