bug-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug swing/39553] gcj compile error (IllegalArgumentException) when usin


From: gnu_andrew at member dot fsf dot org
Subject: [Bug swing/39553] gcj compile error (IllegalArgumentException) when using the add() method of GCJ container class for a JScrollPanel (Swing)
Date: 15 Apr 2009 20:35:38 -0000


------- Comment #1 from gnu_andrew at member dot fsf dot org  2009-04-15 20:35 
-------
Confirmed.  As a test case, you merely need to add a component to a component
using the ScrollPaneLayout:

  public TestSwing()
  {
    setLayout(new ScrollPaneLayout());                                          
    add(new JButton());                                                         
  }

This runs on IcedTea but fails on Classpath:

Exception in thread "main" java.lang.IllegalArgumentException
   at
javax.swing.ScrollPaneLayout.addLayoutComponent(ScrollPaneLayout.java:148)
   at java.awt.Container.addImpl(Container.java:392)
   at java.awt.Container.add(Container.java:297)
   at javax.swing.JFrame.addImpl(JFrame.java:264)
   at java.awt.Container.add(Container.java:230)
   at TestSwing.<init>(TestSwing.java:12)
   at TestSwing.main(TestSwing.java:17)

The error is not in ScrollPaneLayout.  Changing the code to:

    ScrollPaneLayout l = new ScrollPaneLayout();
    l.addLayoutComponent("", new JButton());

correctly triggers an IllegalArgumentException on both IcedTea and Classpath:

$ cacao TestSwing
Exception in thread "main" java.lang.IllegalArgumentException
   at
javax.swing.ScrollPaneLayout.addLayoutComponent(ScrollPaneLayout.java:148)
   at TestSwing.<init>(TestSwing.java:12)
   at TestSwing.main(TestSwing.java:19)

$ /usr/lib/icedtea6/bin/java TestSwing
Exception in thread "main" java.lang.IllegalArgumentException: invalid layout
key 
        at
javax.swing.ScrollPaneLayout.addLayoutComponent(ScrollPaneLayout.java:257)
        at TestSwing.<init>(TestSwing.java:12)
        at TestSwing.main(TestSwing.java:19)


-- 

gnu_andrew at member dot fsf dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2009-04-15 20:35:38
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39553





reply via email to

[Prev in Thread] Current Thread [Next in Thread]