When using a JFormattedTextField calling preferred_size is not working as would 
a JButton object
------------------------------------------------------------------------------------------------

                 Key: JRUBY-4894
                 URL: http://jira.codehaus.org/browse/JRUBY-4894
             Project: JRuby
          Issue Type: Bug
          Components: Java Integration
    Affects Versions: JRuby 1.5.1
         Environment: Ubuntu / Windows
            Reporter: Jean Lazarou


Using rubish notation for the method 'getPreferredSize' instead of the Java 
name does not resolve the same way for JFormattedTextField as for other 
components like JButton. Next example shows that for JFormattedTextField it 
returns nil. As a workaround use 'get_preferred_size'.

  include Java

  comp = javax.swing.JButton.new("hello")
  puts "#{comp.class} #{comp.preferred_size.nil?} / 
#{comp.get_preferred_size.nil?}"

  comp = javax.swing.JFormattedTextField.new("hello")
  puts "#{comp.class} #{comp.preferred_size.nil?} / 
#{comp.get_preferred_size.nil?}"

-- 
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