Login | Register
My pages Projects Community openCollabNet

If you were registered and logged in, you could join this project.

Summary Java GUI library for Win32 API compatible systems
Category libraries
License X/MIT License
Owner(s) chris_bozko

DirectForms is an open source Java GUI library for Win32 API compatible systems modeled after Microsoft WindowsForms framework.
Name DirectForms underlines, that the library, on one hand, resembles WinForms(in terms of similar API) and on the other hand directly or nativly uses platform GUI.

DirectForms is available under X/MIT licence and is commercially-friendly.

Mission

Project mission is to develop Java GUI library that is modeled after Microsoft WindowsForms framework(which is a part of .NET), instead of inventing some new API. The DirectForms API should resemble WinForms API as much as it is possible. It will be beneficial to both users and programmers because users will get fast, native UI Java applications and programmers will be able to use API that will be available on both .NET and Java platforms. This way their investment in learning and mastering new API is secured. Also, developers will be able to use numerous books, tutorials, articles regarding WinForms and only with slightest changes(mainly due to diffrences between C# or VB.NET and Java languages) apply them to DirectForms. To read about these differences click here.

In the beginning, DirectForms should work on Microsoft Windows 98, Me, 2000 and XP. Microsoft Windows 95 won't be serviced due to project dependency on GUI+ which is not available to Microsoft Windows 95. In future, DirectForms might be available on Linux operating system through WINE compatiblity layer. But right now, as 95% of desktop computers use variety of different flavors of Microsoft Windows operating system, this is target platform for DirectForms.

DirectForms is now developed and intended to work on Java 1.4 compatible virtual machines. But as soon as Java 1.5 will be available, DirectForms will use it as required platform. It is due to intended use of enum types and generics. DirectForms is developed in Java and some native parts are developed in C++. It is expected, that at least 90% of code will be Java code. C++ code is used through JNI to make system calls to Win32 API.

The biggest obstacle for success of DirectForms project is mental block of many of Java programmers, who thinks, that Java has to be platform independent. But if Java is to be one of major languages to develop Windows desktop application it must offer similar capabilities as .NET platform which includes, among others, fast native GUI. Developers, of course, can use Standard Widget Toolkit (SWT) but then, they have to learn new, non-standard API. DirectForms library is intended to mimic WindowsForms, which is standard .NET GUI framework.

Example

Here you can see very simple example (type of Hello world application) and its output.

import system.windows.forms.Application;
import system.windows.forms.Form;

public class MyForm extends Form
{
	public MyForm()
	{
		setText("Hello World!");
	}
	
	public static void main(String[] args)
	{
		Application.run(new MyForm());
	}
}
	

Related resources

Here are some resources beneficial to you if you are interested in developing DirectForms:

Documentation of Microsoft WinForms, which should be useful as documentation of DirectForms.

The Official Microsoft Windows Forms Community Site. Look at Articles section. It contains some usuful resources.

Documentation of Microsoft GUI+, which is part of WinForms.

Specification of Java Native Interface(JNI). JNI is used to implement system calls to Win32 API in DirectForms.

Mono project. You can download source code of this project, which goal is to clone .NET platform. It contains some WindowsForms source code in C# that implements parts of WindowsForms framework using WINE. Source code of WindowsForms is available under MIT X11 license, which makes it useful for DirectForms. However, this part of project Mono is not mature and is still under heavy development.