src/share/classes/javax/swing/JToolBar.java

Print this page




  35 import java.awt.LayoutManager;
  36 import java.awt.LayoutManager2;
  37 import java.awt.event.*;
  38 import java.beans.*;
  39 
  40 import javax.swing.border.Border;
  41 import javax.swing.plaf.*;
  42 import javax.accessibility.*;
  43 
  44 import java.io.Serializable;
  45 import java.io.ObjectOutputStream;
  46 import java.io.ObjectInputStream;
  47 import java.io.IOException;
  48 import java.util.Hashtable;
  49 
  50 
  51 /**
  52  * <code>JToolBar</code> provides a component that is useful for
  53  * displaying commonly used <code>Action</code>s or controls.
  54  * For examples and information on using tool bars see
  55  * <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/toolbar.html">How to Use Tool Bars</a>,
  56  * a section in <em>The Java Tutorial</em>.
  57  *
  58  * <p>
  59  * With most look and feels,
  60  * the user can drag out a tool bar into a separate window
  61  * (unless the <code>floatable</code> property is set to <code>false</code>).
  62  * For drag-out to work correctly, it is recommended that you add
  63  * <code>JToolBar</code> instances to one of the four "sides" of a
  64  * container whose layout manager is a <code>BorderLayout</code>,
  65  * and do not add children to any of the other four "sides".
  66  * <p>
  67  * <strong>Warning:</strong> Swing is not thread safe. For more
  68  * information see <a
  69  * href="package-summary.html#threading">Swing's Threading
  70  * Policy</a>.
  71  * <p>
  72  * <strong>Warning:</strong>
  73  * Serialized objects of this class will not be compatible with
  74  * future Swing releases. The current serialization support is
  75  * appropriate for short term storage or RMI between applications running




  35 import java.awt.LayoutManager;
  36 import java.awt.LayoutManager2;
  37 import java.awt.event.*;
  38 import java.beans.*;
  39 
  40 import javax.swing.border.Border;
  41 import javax.swing.plaf.*;
  42 import javax.accessibility.*;
  43 
  44 import java.io.Serializable;
  45 import java.io.ObjectOutputStream;
  46 import java.io.ObjectInputStream;
  47 import java.io.IOException;
  48 import java.util.Hashtable;
  49 
  50 
  51 /**
  52  * <code>JToolBar</code> provides a component that is useful for
  53  * displaying commonly used <code>Action</code>s or controls.
  54  * For examples and information on using tool bars see
  55  * <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/toolbar.html">How to Use Tool Bars</a>,
  56  * a section in <em>The Java Tutorial</em>.
  57  *
  58  * <p>
  59  * With most look and feels,
  60  * the user can drag out a tool bar into a separate window
  61  * (unless the <code>floatable</code> property is set to <code>false</code>).
  62  * For drag-out to work correctly, it is recommended that you add
  63  * <code>JToolBar</code> instances to one of the four "sides" of a
  64  * container whose layout manager is a <code>BorderLayout</code>,
  65  * and do not add children to any of the other four "sides".
  66  * <p>
  67  * <strong>Warning:</strong> Swing is not thread safe. For more
  68  * information see <a
  69  * href="package-summary.html#threading">Swing's Threading
  70  * Policy</a>.
  71  * <p>
  72  * <strong>Warning:</strong>
  73  * Serialized objects of this class will not be compatible with
  74  * future Swing releases. The current serialization support is
  75  * appropriate for short term storage or RMI between applications running