#!/usr/bin/perl # http://perlmonks.org/?node_id=1185809 use strict; use warnings; use Tk; my $mw = MainWindow->new; $mw->Label( -text => 'top part', -height => 5, )->pack; $mw->Frame( -height => 2, -bg => 'black', )->pack( -fill => 'x' ); $mw->Label( -text => 'bottom part', -height => 5, )->pack( -side => 'bottom'); $mw->Frame( -height => 2, -bg => 'black', )->pack( -side => 'bottom', -fill => 'x' ); $mw->Label( -text => 'left part', -height => 5, -padx => 25, )->pack( -side => 'left'); $mw->Frame( -width => 2, -bg => 'black', )->pack( -side => 'left', -fill => 'y' ); $mw->Label( -text => 'right part', -height => 5, -padx => 25, )->pack( -side => 'left'); MainLoop;