Programs with a Graphical User Interface (GUI)

The table below contains links to computer programs that provide a Graphical User Interface (GUI) to their users. This means in practice that the programs open new windows to the computer screen. The windows may contain buttons, text fields, scrollbars, and many other graphical elements (widgets), and the user can control the programs with a mouse. With these programs you can study the basics of writing GUI programs. You need to know the basics of programming before you start studying these programs. These programs are not presented in the books of Kari Laitinen.
More general information.
© 2006-2009 Kari Laitinen 

  Java Python (Linux) C# (Windows)  
  Java programs should run in all operating systems provided that the Java Runtime Environment (JRE) for the operating system in question is installed. Those Java programs whose name ends with the word "Applet" are programs that run on a web page. Those programs whose name contains the word "Application" are Java applications that can be executed in traditional way. A suitable .html file is provided for the applets so that you can run the programs with your Java-enabled browser. All Java GUI programs.

These Python programs run on Linux platforms. These programs utilize a version of the PyGTK library. The programs that have "GTK" in their name run on traditional Linux platforms. The programs that have the word "Maemo" in their name run on the Maemo platform, which is a Linux-based operating system used in Nokia Internet Tablets (e.g. Nokia 770, N800, N810). Many of the GTK programs run on Maemo as well. All Maemo versions. All GTK versions.

C# is a programming language that was developed for Windows programming. Hence, these programs run best in Windows computers. The .NET Framework should be installed in the used computer. If necessary, you can compile and run these programs via the command prompt window. Here you can find more information about the compilation and execution of C# programs. All C# GUI programs.

Simple programs which show some text in a window. HelloApplet.java
Hello.html
HelloPanelApplet.java
HelloPanel.html
HelloAWTApplet.java
HelloAWT.html
HelloSimpleApplet.java
HelloSimple.html
HelloGTK.py
HelloSimpleGTK.py
HelloMaemo.py
HelloSimpleMaemo.py
HelloApplication.cs
Programs that demonstrate methods that can be used to draw various graphical objects (e.g. rectangles, lines, ovals, arcs, texts, etc.) into a window. DrawingDemoApplet.java
DrawingDemo.html
DrawingDemoPanelApplet.java
DrawingDemoPanel.html
DrawingDemoAWTApplet.java
DrawingDemoAWT.html
EarthAndMoonApplet.java
EarthAndMoon.html
DrawingDemoGTK.py
DrawingDemoMaemo.py




EarthAndMoonGTK.py



Using advanced 2D graphics in drawing: moving the zero point of the graphical coordinate system, rotation of the coordinate system, scaling graphical objects. FlyingArrowApplet.java
FlyingArrow.html
StarsApplet.java
Stars.html
AceOfSpadesApplet.java
AceOfSpades.html

FlyingArrowApplication.cs

Programs that produce animation to the screen. These programs demonstrate the use of threads. AnimationDemoApplet.java
AnimationDemo.html
WormApplet.java
Worm.html
WormPanelApplet.java
WormPanel.html
WormOffscreenApplet.java
WormOffscreen.html
PacmanApplet.java
Pacman.html
AnimationDemoGTK.py
AnimationDemoGTKnoclass.py
WormGTK.py
AnimationDemoApplication.cs
Programs that display a graphical clock to the screen. These programs demonstrate the use of threads and acquiring the current time. ClockApplet.java
Clock.html
DoubleClockApplet.java
DoubleClock.html
ClockGTK.py ClockApplication.cs
ClockOffscreenApplication.cs
Programs that show how picture files (e.g. .jpg files) can be shown on the screen. The used picture files can be found at the end of this folder. SinglePictureApplet.java
SinglePicture.html
SinglePictureApplication.java
PictureShowApplet.java
PictureShow.html
EnlargingPicturesApplet.java
EnlargingPictures.html
SinglePictureGTK.py
PictureShowGTK.py
PictureShowSimpleGTK.py
SinglePictureApplication.cs
Programs that demonstrate how a program can react to mouse events such as pressings of a mouse button or mouse movements. In some systems (e.g. Maemo) mouse is replaced by a stylus. ClickingsApplet.java
Clickings.html
DrawingLinesApplet.java
DrawingLines.html
DrawingLinesPanelApplet.java
DrawingLinesPanel.html
DrawingLinesApplication.java
DrawingRectanglesApplet.java
DrawingRectangles.html
MouseDemoApplet.java
MouseDemo.html
ClickingsGTK.py
ClickingsGTKArray.py
DrawingLinesGTK.py






MouseDemoGTK.py









MouseDemoApplication.cs
Programs that demonstrate how a program can react to keyboard events, i.e., find out when keys are pressed and released on the keyboard. KeyboardInputDemoApplet.java
KeyboardInputDemo.html
KeyboardInputDemoMaemo.py
KeyboardInputFullScreenMaemo.py
KeyboardInputDemoGTK.py
 
Programs that demonstrate the use of buttons and a list of choices. MovingBallApplet.java
MovingBall.html
MovingBallPanelApplet.java
MovingBallPanel.html
MovingBallApplication.java
MovingBallPanelApplication.java
MovingBallAWTApplet.java
MovingBallAWT.html
MovingBallAWTApplication.java




MovingBallMaemo.py
MovingBallGTK.py




MovingBallApplication.cs
Object-oriented versions of the previous programs. Ball.java
MovingBallOOApplet.java
MovingBallOO.html
BallGTK.py
MovingBallOOGTK.py
 
Programs which show three Ball objects in a window and it is possible to drag the balls by using a mouse or a stylus. Ball.java
MovingBallWithMouseApplet.java
MovingBallWithMouse.html
BallGTK.py
MovingBallWithMouseGTK.py
 
Programs that demonstrate the use of text fields and text areas. These are display components (widgets) into which the user can write text. SumApplet.java
Sum.html
NewTextFileApplication.java
SumGTK.py SumApplication.cs
Programs that demonstrate the use of scrollbars and radio buttons. RectangleApplet.java
Rectangle.html
RectangleAWTApplet.java
RectangleAWT.html
RectangleMaemo.py
RectangleGTK.py
 
The use of "slider", "spinner", and label objects in GUI construction. CurtainsApplet.java
Curtains.html
CurtainsGTK.py  
Programs that show how menus, pop-up menus, and toolbars can be built. MenuDemoApplet.java
MenuDemo.html
MenuDemoApplication.java
MenuDemoWithToolbarApplication.java
MenuDemoWithPopupMenuApplication.java
MenuDemoWithPopupMenuSimple.java
MenuDemoApplicationGTK.py
MenuDemoApplicationMaemo.py
MenuDemoWithToolbarGTK.py
MenuDemoWithToolbarMaemo.py
MenuDemoWithPopupMenuGTK.py
MenuDemoWithPopupMenuMaemo.py
MenuDemoApplication.cs
MenuDemoWithToolbarApplication.cs
MenuDemoWithPopupMenuApplication.cs
These programs demonstrate active rendering and some advanced "graphical" and "geometrical" operations. BeatingHeartApplet.java
BeatingHeart.html
AtomApplet.java
Atom.html
   
"Object-oriented" programs that are constructed of several classes. DrawingGraphicalObjectsApplet.java
DrawingGraphicalObjects.html
WheelsApplet.java
Wheels.html
FlagsApplet.java
Flags.html




FlagsGTK.py
 
Programs to check system properties. SystemCheckApplet.java
SystemCheck.html
   
More links. Here you can find some of the above Java programs in Finnish. This means that comments and identifier names in the programs are written in Finnish.

Here you can find some examples of Java midlets, Java programs that run in a mobile phone.

Here you'll find some Python GUI programs that are based on the PyQt class libraries. PyQt is an alternative technology that can replace PyGTK.  


MORE INFO: How to use the programs on this page

The idea with these programs is that if you know how one program works, you can easily find out how the same program can be written with another programming language. For example, in the Java column of the table you can find a program named MovingBallApplication.java. In the next columns you can find programs MovingBallMaemo.py, MovingBallGTK.py, and MovingBallApplication.cs, which show how a program that works like MovingBallApplication.java can be written with the Python and C# programming languages. This table should be useful if you want to switch from one programming language to another.

The Java column of the table provides several versions of a single program. Most of these programs are so-called Java applets. For example, program MovingBallApplet.java is a Java applet that works in the same way as MovingBallApplication.java. The benefit of the applets is that you can run them with your Internet browser when you click the .html file (e.g. MovingBall.html). The running of Java applets must be enabled in your Internet browser. Even if you are not searching for Java-related information, you might run the Java applets in order to find out how the corresponding Python or C# programs work.

To www.naturalprogramming.com main page

To the basic examples of computer programs.

2009-11-18  Last modification of this page

 © Kari Laitinen