use strict;
use warnings;
use Tk;

my $mw = new MainWindow;

my $textarea = $mw->Frame();
my $txt = $textarea->Text(-width => 40, -height => 10);
my $srl_y = $textarea->Scrollbar(-orient => 'vertical',
                                 -command => [yview  =>  $txt]);
my $srl_x = $textarea->Scrollbar(-orient => 'horizontal',
                                 -command => [xview  =>  $txt]);
$txt->configure(-yscrollcommand => ['set', $srl_y],
		            -xscrollcommand => ['set',$srl_x]);
$txt -> insert('end',
"The primary purpose of the Data statement is to give names\n 
to constants; instead of referring to PI as 3.141592653589793\n
at every appearance, the variable Pi can be given that value\n
with a Data statement and used instead of the longer form of\n
the constant. This also simplifies modifying the program,\n
should the value of PI change.\n
\n
Fortran manual for Xerox Computers");

$txt->grid(-row => 1,-column => 1);
$srl_y->grid(-row => 1, -column => 2, -sticky => "ns");
$srl_x->grid(-row => 2, -column => 1, -sticky => "ew");
$textarea->grid(-row => 1, -column => 1, -columnspan => 2);

MainLoop;
