This post originated from an RSS feed registered with Java Buzz
by Toyokazu Tomatsu.
|
Original Post: PnutsLayout in SwiXml
Feed Title: Pnuts Addict
Feed URL: http://jroller.com/tomatsu/feed/entries/rss
Feed Description: Toyokazu Tomatsu's Weblog
|
Latest Java Buzz Posts
Latest Java Buzz Posts by Toyokazu Tomatsu
Latest Posts From Pnuts Addict
|
|
Advertisement
|
PnutsLayout is a LayoutManger designed after Tk packer. Here is my hack to integrate the layout manager to SwiXml.
Example
pnutslayout.xml
<?xml version="1.0" encoding="UTF-8"?>
<frame name="mainframe" size="740,480" title="PnutsLayout sample" plaf="com.sun.java.swing.plaf.windows.WindowsLookAndFeel">
<panel Bounds="10,10,150,150" Layout="PnutsLayout(cols=3)" Visible="true" Resizable="true">
<button id="b1" Action="a1" constraints="colspan=2,valign=fill,halign=fill,expand=x">1</button>
<button id="b2" Action="a2" constraints="rowspan=2,valign=fill,halign=fill,expand=y">2</button>
<button id="b3" Action="a3" constraints="rowspan=2,halign=fill,valign=fill,expand=y">3</button>
<button id="b4" Action="a4" constraints="colspan=2,halign=fill,expand=x">4</button>
</panel>
</frame>
C:\> set CLASSPATH=pnuts.jar;pnuts-modules.jar;pnuts-swixml.jar;swixml.jar;jdom.jar
C:\> java org.swixml.ScriptingSwingEngine pnutslayout.xml
Read: PnutsLayout in SwiXml