KickJava   Java API By Example, From Geeks To Geeks.

Java > Java SE, EE, ME > javax > swing > Box

javax.swing
Class Box

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.Box
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible
See Also:
Top Examples, Source Code, XMLEncoder, BoxLayout

protected AccessibleContext accessibleContext
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public Box(int axis)
See Also:
createVerticalBox(), createHorizontalBox(), AWTError, BoxLayout.PAGE_AXIS, BoxLayout.LINE_AXIS, BoxLayout.Y_AXIS, BoxLayout.X_AXIS
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


[465]Create a JDialog
By Anonymous on 2003/10/19 07:38:29  Rate
JDialog dialog = new JDialog (  ) ; 
         dialog.setTitle ( "Welcome" ) ; 
         dialog.setSize ( 400,200 ) ; 
      dialog.setLocation ( 300,200 ) ; 
      JPanel jp= new JPanel (  ) ; 
      JLabel label1= new JLabel ( "OK" ) ; 
      JLabel label2= new JLabel ( "Cancel" ) ; 
         JButton button1 = new JButton ( "ok" ) ; 
     JButton button2 = new JButton ( "cancel" ) ; 
     jp.setLayout ( new BoxLayout (  )  ) ; 
     jp.add ( label1 ) ; 
     jp.add ( label2 ) ; 
     jp.add ( button1 ) ; 
     jp.add ( button2 ) ; 
     dialog.getContentPane (  ) .add ( jp ) ; 
         dialog.setVisible ( true ) ;


public static Component createGlue()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static Box createHorizontalBox()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static Component createHorizontalGlue()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static Component createHorizontalStrut(int width)
See Also:
createRigidArea(java.awt.Dimension), createGlue(), createVerticalStrut(int)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static Component createRigidArea(Dimension d)
See Also:
createVerticalStrut(int), createHorizontalStrut(int), createGlue()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static Box createVerticalBox()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static Component createVerticalGlue()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static Component createVerticalStrut(int height)
See Also:
createRigidArea(java.awt.Dimension), createGlue(), createHorizontalStrut(int)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public AccessibleContext getAccessibleContext()
See Also:
JComponent, Accessible
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void setLayout(LayoutManager l)
See Also:
Container.getLayout(), Container.doLayout()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  

Popular Tags