First project in Ada, display a window
with java.applet.Applet;
with java.lang.String;
package window is
procedure main(argv : java.lang.String.String_Array);
type window_obj is new java.applet.Applet.Applet_obj with null record;
type window_ptr is access all window_obj'class;
procedure init(windowObject_ptr : access window_obj);
end window;
with interfaces.java; use interfaces.java;
with Ind_Frame;
package body window is
windowFrame_ptr : Ind_Frame.Ind_Frame_ptr;
procedure main(argv : java.lang.String.String_Array) is
aWindow : window_ptr;
begin
aWindow := new window_obj;
init(aWindow);
end main;
procedure init(windowObject_ptr : access window_obj) is
frameWidth : constant Integer := 100;
frameHeight : constant Integer := 200;
begin
windowFrame_ptr := Ind_Frame.new_ind_Frame(+"Title Bar");
Ind_Frame.resize(windowFrame_ptr, frameWidth, frameHeight);
Ind_Frame.show(windowFrame_ptr);
end init;
end window;
...View Guestbook or
...Sign Guestbook