In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "Java Swing case Analysis". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Next, let the editor take you to learn "Java Swing case Analysis"!
When Abacus Research AG, a commercial software development company, decided to shift its development platform from Borland's Delphi to Java Swing, it found itself at a crossroads in software development.
Our large number of application development teams have many years of Delphi GUI development experience, but no Java Swing experience, and we need to convert a large number of Delphi applications to Swing in a very short time. After studying the GUI tools available at that time, we felt that we should achieve our goal by sponsoring an open source GPL Java GUI compiler that could help other application developers face the same challenges.
AbaGUIBuilder, the Abacus Java GUI compiler is designed to easily move from VB or Delphi development to Java Swing. This strategy helps Abacus Research achieve the delivery of its Java version of applications, shortens development time, and allows its developers to focus on commercial applications rather than the intricacies of the Swing framework.
As shown in figure 1, AbaGUIBuilder has elements that can be found in many other development environments such as VB and Delphi. Located in the upper-left corner of the window is the active object tree, and below it is the Swing component selection area. Located in the middle and upper part of the window is the development panel, or "canvas", where you put the Swing component to instantiate it. On the upper right is the attribute Editor. The lower part is the event panel, including two tab pages, the event code editor, which adds the event code for each individual visual object, and the message panel, which displays the status message of the AbaGUIBuilder.
Abacus GUI compiler
Why make our own GUI tools?
Why do we choose to write our own tools? At first, we decided that our tools should include the following five requirements:
1. Easy to use
two。 No experience with layout manager is required
3. No experience in using Swing is required
4. No need to output Swing code
5. Realize the separation of business logic and UI
When we evaluated the GUI development tools available at that time, we found that the good IDE was handwritten Swing code, which did not meet our key requirements.
Our definition of ease of use means that any developer, regardless of his or her Java Swing experience, has the ability to develop a runnable GUI form in minutes rather than hours, so the developer should focus on business logic rather than framework details. From the beginning, our developers need a WYSIWYG environment so that they can truly perceive what happens when the application is released. The implementation of this function saves developers a lot of time. But none of the tools we evaluated at the time could do this; the designed screen was different from the output screen, and the bad scheduling algorithm was a huge step backwards for us. AbaGUIBuilder does this in preview mode, and you can see it running as you develop it.
Why does Abacus Research require the separation of UI and business logic? Because companies have to deal with changing government rules, such as tax and payroll calculations, we need the ability to keep UI unchanged while maintaining rules and formulas in a separate packaging module, so that when the formula changes, the application JAR (UI) does not need to change. So only the changed formula needs to be tested to simplify the release process.
To meet this requirement, the GUI compiler we designed assembles applications and events into one application JAR,JAR hides all GUI Swing code and executes the application at run time through a renderer class (AdaRenderer).
Java Swing experience
In order to ensure that the development tools can achieve real WYSIWYG, we decided to use layout management similar to Delphi and VB using XY coordinates to locate. In this way, Swing JFrame is a canvas, and developers can put Swing components into the XY layout of JFrame. With the XY layout manager, our developers do not need to understand the complex layout managers that are unfamiliar with Swing, so our application developers can focus on the application UI and its business logic.
In fact, AbaGUIBuilder contains most of the Swing visual components, from panels to tab pages, as well as menus, menu items, database-aware components with Java database connections, JFreeChart component support, and the ability to import third-party visual class libraries. All of these components can be dragged into an empty framework from the component selection area to develop your GUI application.
At this point, I believe you have a deeper understanding of "Java Swing case analysis", you might as well come to the actual operation of it! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.