jdk/src/share/classes/javax/swing/JPanel.java

Print this page

        

@@ -23,17 +23,17 @@
  * questions.
  */
 package javax.swing;
 
 import java.awt.*;
+import java.beans.JavaBean;
+import java.beans.BeanProperty;
 
 import javax.swing.plaf.*;
 import javax.accessibility.*;
 
-import java.io.Serializable;
 import java.io.ObjectOutputStream;
-import java.io.ObjectInputStream;
 import java.io.IOException;
 
 
 /**
  * <code>JPanel</code> is a generic lightweight container.

@@ -54,17 +54,15 @@
  * the same version of Swing.  As of 1.4, support for long term storage
  * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
- * @beaninfo
- * description: A generic lightweight container.
- *
  * @author Arnaud Weber
  * @author Steve Wilson
  * @since 1.2
  */
+@JavaBean(defaultProperty = "UI", description = "A generic lightweight container.")
 @SuppressWarnings("serial") // Same-version serialization only
 public class JPanel extends JComponent implements Accessible
 {
     /**
      * @see #getUIClassID

@@ -143,16 +141,13 @@
      * Sets the look and feel (L&amp;F) object that renders this component.
      *
      * @param ui  the PanelUI L&amp;F object
      * @see UIDefaults#getUI
      * @since 1.4
-     * @beaninfo
-     *        bound: true
-     *       hidden: true
-     *    attribute: visualUpdate true
-     *  description: The UI object that implements the Component's LookAndFeel.
      */
+    @BeanProperty(hidden = true, visualUpdate = true, description
+            = "The UI object that implements the Component's LookAndFeel.")
     public void setUI(PanelUI ui) {
         super.setUI(ui);
     }
 
     /**

@@ -160,14 +155,13 @@
      * that renders this component.
      *
      * @return "PanelUI"
      * @see JComponent#getUIClassID
      * @see UIDefaults#getUI
-     * @beaninfo
-     *        expert: true
-     *   description: A string that specifies the name of the L&amp;F class.
      */
+    @BeanProperty(bound = false, expert = true, description
+            = "A string that specifies the name of the L&amp;F class.")
     public String getUIClassID() {
         return uiClassID;
     }
 
 

@@ -211,10 +205,11 @@
      * A new AccessibleJPanel instance is created if necessary.
      *
      * @return an AccessibleJPanel that serves as the
      *         AccessibleContext of this JPanel
      */
+    @BeanProperty(bound = false)
     public AccessibleContext getAccessibleContext() {
         if (accessibleContext == null) {
             accessibleContext = new AccessibleJPanel();
         }
         return accessibleContext;