[gui][PATCH] Fix errors found by jikes

Kim Ho kho@redhat.com
Wed Jul 14 05:15:00 GMT 2004


Hi,

This patch allows the gui-branch to be compiled with jikes again. Thanks
to Olga for pointing it out.

Cheers,

Kim

2004-07-13  Kim Ho  <kho@redhat.com>

	* javax/swing/JToolBar.java:
	(layoutContainer): Use getComponents.
	* javax/swing/plaf/basic/BasicToolBarUI.java:
	(DragWindow): Don't use SwingUtilities' 
	getOwnerFrame
	(ToolBarDialog): ditto.


-------------- next part --------------
? jikescompile.fix
Index: javax/swing/JToolBar.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/JToolBar.java,v
retrieving revision 1.3.8.5
diff -u -r1.3.8.5 JToolBar.java
--- javax/swing/JToolBar.java	12 Jul 2004 19:52:46 -0000	1.3.8.5
+++ javax/swing/JToolBar.java	13 Jul 2004 14:53:15 -0000
@@ -140,7 +140,7 @@
 	  insets.bottom += margin.bottom;
 	  insets.right += margin.right;
         }
-      Component[] components = c.component;
+      Component[] components = c.getComponents();
       Dimension tdims = c.getSize();
       int start = 0;
       Dimension pref;
Index: javax/swing/plaf/basic/BasicToolBarUI.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/plaf/basic/BasicToolBarUI.java,v
retrieving revision 1.1.2.5
diff -u -r1.1.2.5 BasicToolBarUI.java
--- javax/swing/plaf/basic/BasicToolBarUI.java	12 Jul 2004 19:52:46 -0000	1.1.2.5
+++ javax/swing/plaf/basic/BasicToolBarUI.java	13 Jul 2004 14:53:15 -0000
@@ -1095,7 +1095,7 @@
      */
     private DragWindow()
     {
-      super((Window) SwingUtilities.getOwnerFrame());
+      super();
     }
 
     /**
@@ -1285,8 +1285,8 @@
      */
     public ToolBarDialog()
     {
-      super(SwingUtilities.getOwnerFrame(),
-            (toolBar.getName() != null) ? toolBar.getName() : "");
+      super();
+      setName((toolBar.getName() != null) ? toolBar.getName() : "");
     }
   }
 


More information about the Java-patches mailing list