RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX


Delphi and VB Developers, You Too Can Build Java GUIs : Page 3

When Delphi and Visual Basic application developers migrate to Java, they often encounter complexities that limit their ability to concentrate on the application logic. The open source visual tool AbaGUIBuilder helps application developers bridge this gap when building Java GUIs.


Writing Your Own Wrapper Program

Typically, you write your own rendering program if you wish to separate the UI from the application, or when you want to have direct control of the UI components. For example, if you wanted to use a third-party library that required a specific listener, you could add this listener in your wrapper code and update the UI components from the wrapper.

If you decide to write your own wrapper, you must take the following steps:

  1. Create an AbaRenderer object.
  2. Execute its Load() method, which returns "true" if the application jar has been loaded.
  3. Execute the RenderInterface() method in order to render the application:
    	    String jarname = "\\abaguibuilder-1.7\\samples\\person.jar";
    	    m_AbaRenderer = new AbaRenderer(jarname, true , null);  	 
            boolean bTestLoad = m_AbaRenderer.load();

Another reason to write your own wrapper is to initialize the visual controls on the form with code in the wrapper program. For example, to load the combo box with items before it is rendered onscreen (as in Listing 2), you can paste the object definitions and the getReferences() function into your wrapper code.

Separating the UI from the business logic is an important topic to consider when designing a visual application. Although beyond the scope of this article, be sure to keep this in mind when using the AbaGUIBuilder.

Delphi and VB Developers, This One's for You

The AbaGUIBuilder has the unique charter of it focusing exclusively on the Delphi and VB developer moving to Java/Swing. As a result, it's not for everyone--it provides the greatest benefit to those application developers seeking an easy front-end development tool similar to VB or Delphi. Abacus Research simplified the IDE with a true WYSIWYG environment, removed complicated layout managers, and hid UI implementation details from the developer.

Mario Castillo has over 14 years of experience with large commercial projects as an independent software consultant. He founded his own firm Castellum Technologies in Miami Beach, Fla. and he is a member of the Open Abacus team.
Email AuthorEmail Author
Close Icon
Thanks for your registration, follow us on our social networks to keep up-to-date