All Downloads are FREE. Search and download functionalities are using the official Maven repository.

examples.layout.LayoutFrame.xml Maven / Gradle / Ivy

The newest version!
<?xml version="1.0" encoding="UTF-8"?>
<dialog name="mainframe" minimumSize="740,480" title="SWIXML2 - Layouts" defaultCloseOperation="JFrame.HIDE_ON_CLOSE">
  <desktoppane>

    <internalframe Title="Grid Layout" Bounds="185,10,175,160" Layout="GridLayout(2,2)" Visible="true" Resizable="true">
      <button text="1"/>
      <button text="2"/>
      <button text="3"/>
      <button text="4"/>
    </internalframe>

    <internalframe Title="Border Layout" bounds="390,10,320,175" layout="BorderLayout" visible="true" resizable="true">
      <button constraints="BorderLayout.NORTH">North</button>
      <button constraints="BorderLayout.EAST">East</button>
      <button constraints="BorderLayout.SOUTH">South</button>
      <button constraints="BorderLayout.WEST">West</button>
      <button constraints="BorderLayout.CENTER">Center</button>
    </internalframe>

    <internalframe Title="Vertical Box" Bounds="10,170,180,250" Layout="GridLayout(1,2)" Visible="true" Resizable="true">

      <vbox border="TitledBorder(with filler)">
        <button text="1"/>
        <box.vstrut height="15" />
        <button text="2"/>
        <box.rigidarea size="7,10" />
        <button text="3"/>
        <box.vglue/>
        <button text="4"/>
      </vbox>

      <vbox gap="5" border="TitledBorder(with gap)">
        <button text="1"/>
        <button text="2"/>
        <button text="3"/>
        <button text="4"/>
      </vbox>

    </internalframe>
    

    <internalframe Title="Horizontal Box" Bounds="180,170,400,180" Layout="GridLayout(2,1)" Visible="true" Resizable="true">
      <hbox border="TitledBorder(with filler">
        <button text="1"/>
        <box.hstrut width="5" />
        <button text="2"/>
        <box.rigidarea size="10,7" />
        <button text="3"/>
        <box.hglue/>
        <button text="4"/>
      </hbox>
      <hbox gap="10" border="TitledBorder(with gap)">
        <button text="1"/>
        <button text="2"/>
        <button text="3"/>
        <button text="4"/>
      </hbox>
    </internalframe>

    <internalframe Title="Gridbag Layout" Bounds="580,170,220,210" Layout="GridBagLayout" Visible="true" Resizable="true">
      <button text="Wonderful">
        <gridbagconstraints id="gbc_1" insets="2,2,2,2" gridx="0" gridy="0" ipadx="15" ipady="15" weightx="1" weighty="1"/>
      </button>
      <button text="World">
        <gridbagconstraints refid="gbc_1" gridx="1"/>
      </button>
      <button text="of">
        <gridbagconstraints refid="gbc_1" gridy="1"/>
      </button>
      <button text="Swixml">
        <gridbagconstraints refid="gbc_1" gridx="1" gridy="1"/>
      </button>
    </internalframe>

    <internalframe Title="Flow Layout (right aligned)" Bounds="200,380,370,100" Layout="FlowLayout(FlowLayout.RIGHT)" visible="true" Resizable="true">
      <button>1</button>
      <button>2</button>
      <button>3</button>
      <button>4</button>
    </internalframe>


  </desktoppane>
</dialog>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy