Using java technologies to develop graphical applications | Статья в журнале «Молодой ученый»

Отправьте статью сегодня! Журнал выйдет 28 декабря, печатный экземпляр отправим 1 января.

Опубликовать статью в журнале

Автор:

Рубрика: Информационные технологии

Опубликовано в Молодой учёный №35 (534) август 2024 г.

Дата публикации: 31.08.2024

Статья просмотрена: 15 раз

Библиографическое описание:

Ухливанов, С. М. Using java technologies to develop graphical applications / С. М. Ухливанов. — Текст : непосредственный // Молодой ученый. — 2024. — № 35 (534). — С. 22-25. — URL: https://moluch.ru/archive/534/117383/ (дата обращения: 16.12.2024).



The article is devoted to the consideration of topical issues related to the use of Java technologies for the development of graphical applications. Special attention is paid to graphical capabilities of Java language and used class libraries. The methods of drawing offered by the Graphics class are described. In addition, a step-by-step plan of creating a graphical application based on Java 3D is developed.

Keywords: Java, graphics, application, drawing, scene, class.

Java is an extremely powerful and versatile programming language that has dominated software development for many years. Due to its platform independence and extensive libraries, it remains one of the most popular for developers in various fields. According to Statista, 30 % of developers use Java as their primary language. The latest data published in November 2023 by the TIOBE programming community put Java in third place in popularity with 11.98 %, just behind Python (17.18 %) and C (15.08 %) [1].

A special emphasis should be made on the fact that Java is a widely used programming language for web development, especially on the server side. Web applications in Java represent distributed systems running over the Internet. Java capabilities allow you to create dynamic web pages, facilitating user interaction with the interface. Java is also known for its portability, robust library ecosystem, and cross-platform compatibility. In addition to the noted, today Java possesses large and powerful libraries for working with 2D and 3D graphics, images, and the ability to build complex client-side interactive systems.

Originally, simple graphical capabilities were contained in Java AWT (Abstract Windowing Toolkit) classes, which were created in Java 1.1. In Java 2, there was the Swing system for creating graphical interfaces and Java 2D, which worked with graphics and images in a much more sophisticated way than AWT. Today, specialists already have access to the Java 3D API, which allows the creation of three-dimensional graphical applications and Internet applets. It provides high-level constructs for developing and manipulating three-dimensional geometry and building the structures used to visualize it. With this software, very large virtual worlds can be efficiently created and visualized [2].

In Java, custom drawing is done using the java.awt.Graphics class, which manages the graphics context and provides a set of device-independent methods for drawing text, figures, and images on the screen across platforms. java.awt.Graphics is an abstract class since the drawing process itself is system and device dependent. Each operating platform will provide a subclass of Graphics to perform the actual drawing under its platform, but according to the specification defined in Graphics.

Given the wide possibilities of Java for creating and manipulating images and various kinds of geometry, studying the features and prospects of this programming language for the development of graphical applications represents a relevant scientific and practical problem, the solution of which is devoted to this paper.

The works of K. V. Dergacheva, M. F. Essama, N. A. Kozyreva, P. P. Keino, V. M. Kvashnina, A.Yu. Novikova.

Graphical applications and applets in Java, as well as the features of graphics programming using this language, are analyzed in detail by S. F. Maslovich, R. O. Seglin, A. N. Caunitom, M. A. Temirov.

At the same time, despite the active interest of scholars in the problem at hand, the issues of the step-by-step development of the application design and some of the graphical capabilities of Java require a more detailed description.

Thus, the purpose of the article is to consider the features of using Java — technologies for creating graphical applications.

At the first stage of the study, note that Graphics is an abstract class provided by the Java AWT that is used to draw or color components. It consists of various fields that store information about components subject to coloring, font, color, as well as methods that allow you to draw various figures on GUI components. Graphics is an abstract class and therefore cannot be initialized directly.

The Graphics class provides methods for drawing three types of graphic objects:

  1. Text strings: using the drawString() method. Note that System.out.println() outputs data to the system console and not to the graphical screen.
  2. Vector Graphics Primitives and Figures: using drawXxx() and fillXxx() methods, where Xxx can be Line, Rect, Oval, Arc, PolyLine, RoundRect or 3DRect.
  3. Bitmaps: using the drawImage() method [3].

Also note that the Java language contains two class libraries designed to develop applications that implement a GUI: the AWT library is supplied as part of the JDK in the java.awt package; the JFC library better known as Swing comes as part of the JDK.

Taking into account the fact that today the interactive 3D development of web applications is gaining special popularity and importance, it is considered appropriate to consider the features of Java 3D.

Java 3D provides web application developers with undoubted advantages for working with 3D graphics — “write once, execute anywhere”. Java 3D is included in the JavaMedia set of APIs, making it available on a wide range of platforms. It also integrates well with the Internet since applications and applets written using the Java 3D API have access to the entire set of Java classes.

The Java 3D API draws its ideas from existing graphics APIs and new technologies. Java 3D graphics designs synthesize the best ideas found in low-level APIs such as Direct3D, OpenGL, QuickDraw3D, and XGL. Similarly, higher-level designs synthesize the best ideas found in several scene graph-based systems. In addition, while Java 3D presents some concepts that are not usually considered part of the graphics environment, such as three-dimensional spatial sound. The sound capabilities of Java 3D help enable the development of web applications that allow for a more complete user immersion in what is happening.

Creating a simple 3D application using Java 3D involves several steps.

Step 1: Create a basic Java class named “Simple3DApp” with the following code:

This class sets up a simple universe using the SimpleUniverse utility, sets the location and direction of the viewing platform, forms a scene graph, and adds the scene graph to the universe.

Step 2: Install the viewing platform. Adding the following method to the Simple3DApp class to set the location and direction of the viewing platform:

This method sets the view platform location to (0, 0, 10) by looking at the origin of the coordinates (0, 0, 0) with an upward vector (0, 1, 0).

Step 3: Create a scene graphic. Adding to the Simple3DApp class the following method to create a scene graph:

This method creates a branch group to store the scene graph, a transform group to store the cube and its rotation behavior, the colored cube and adds them to the scene graph.

Step 4: Launch the app.

Thus, the article describes the features of developing a graphical application using Java technology. A step-by-step plan for creating a Java 3D-based graphical application is described.

References:

  1. Dergachev K. V. Development of an automated system for the creation and testing of prototypes of user interfaces // Ergodesign. 2022. No 4 (18). S. 252–261.
  2. Dyatlova AA Development of an application for graphical analysis of functions by means of the programming language JAVA // Student Forum. 2022. No 39–2 (218). Р. 18–24.
  3. Sakovich VV Using Spring Projects family frameworks to develop web applications on the JAVA platform // Intelligent Technologies on Transportation. 2023. No 2 (34). Р. 58–66.
  4. Zditovets A. L. Basic technologies and frameworks for backend development in JAVA // Innovative science. 2023. No 8–2. Р. 16–26.
Основные термины (генерируются автоматически): AWT, API, JAVA, GUI, JDK, JFC, TIOBE, XGL.


Ключевые слова

scene, Java, application, drawing, class, graphics

Похожие статьи

Application of flexible methodology in the development of information systems

The article is devoted to the currently popular topic of the expediency of using an agile development methodology. The author of the study defines this series of approaches to software development, comprehensively characterizes it, and also identifie...

Opinion monitoring and analysis in social networks

The Web-application for analyzing users opinions in social networks is developed in the thesis. The Spring framework was used as a structure of the program system. The Twitter microblog was chosen as a social network. The purpose of this work is to c...

Creating special dictionary on the platform android

This work is considered making the dictionary on three languages: Russian, Uzbek and English on sphere ICT, using оbject-oriented programming languages Java and database SQLite. The words is offered on three languages ICT sphere and created dictionar...

A study on college english teaching mode in the setting of multimedia technology

Language instruction is closely related to media. With the rapid development of multimedia technologies, multimedia, as an assistant means of teaching, finds a broad use in foreign language instruction. Thus, the author makes an attempt at a new teac...

Analysis of schemes for the development of cutting areas by multi-operation machines

The article is devoted to the analysis of technological schemes for the production of assortments in a felling area using a harvester and forwarder. The most environmentally friendly options for wood harvesting by a machine method were determined acc...

Modern pedagogical technologies in teaching foreign languages

This article discusses the problem of finding new techniques and ways to increase motivation for learning foreign languages. One of these forms is new pedagogical technologies, the introduction of which contributes to effective language learning. The...

Web-site «JOB4ALL» – preparation of a feedback module with the administration of the site

This project allows organizing work with personal tips on entering the University, getting the job, etc. There work is carried out with several templates and lets creating CV "immediately", send and save the documents in different formats. In prospec...

Development of Algorithmic Thinking in School Informatics

The article focuses on the significance of algorithmic thinking in the era of information technology. The author discusses methods and approaches to developing algorithmic thinking in students, including the use of various methodological techniques, ...

Robotics problems solution with the use of Reinforcement Learning

Design of complex and hardly engineering behaviors in robotics can be approached with the use of Reinforcement learning (RL), which gives framework and certain tools for it. There is strong relationship between these two disciplines: reinforcement le...

A method of forming lexical skills at training English language

Methods of formation of lexical skills in teaching English language are examined in this article. The author offers different types of tasks for the development of oral and written forms of communication. Special attention is paid to the formation of...

Похожие статьи

Application of flexible methodology in the development of information systems

The article is devoted to the currently popular topic of the expediency of using an agile development methodology. The author of the study defines this series of approaches to software development, comprehensively characterizes it, and also identifie...

Opinion monitoring and analysis in social networks

The Web-application for analyzing users opinions in social networks is developed in the thesis. The Spring framework was used as a structure of the program system. The Twitter microblog was chosen as a social network. The purpose of this work is to c...

Creating special dictionary on the platform android

This work is considered making the dictionary on three languages: Russian, Uzbek and English on sphere ICT, using оbject-oriented programming languages Java and database SQLite. The words is offered on three languages ICT sphere and created dictionar...

A study on college english teaching mode in the setting of multimedia technology

Language instruction is closely related to media. With the rapid development of multimedia technologies, multimedia, as an assistant means of teaching, finds a broad use in foreign language instruction. Thus, the author makes an attempt at a new teac...

Analysis of schemes for the development of cutting areas by multi-operation machines

The article is devoted to the analysis of technological schemes for the production of assortments in a felling area using a harvester and forwarder. The most environmentally friendly options for wood harvesting by a machine method were determined acc...

Modern pedagogical technologies in teaching foreign languages

This article discusses the problem of finding new techniques and ways to increase motivation for learning foreign languages. One of these forms is new pedagogical technologies, the introduction of which contributes to effective language learning. The...

Web-site «JOB4ALL» – preparation of a feedback module with the administration of the site

This project allows organizing work with personal tips on entering the University, getting the job, etc. There work is carried out with several templates and lets creating CV "immediately", send and save the documents in different formats. In prospec...

Development of Algorithmic Thinking in School Informatics

The article focuses on the significance of algorithmic thinking in the era of information technology. The author discusses methods and approaches to developing algorithmic thinking in students, including the use of various methodological techniques, ...

Robotics problems solution with the use of Reinforcement Learning

Design of complex and hardly engineering behaviors in robotics can be approached with the use of Reinforcement learning (RL), which gives framework and certain tools for it. There is strong relationship between these two disciplines: reinforcement le...

A method of forming lexical skills at training English language

Methods of formation of lexical skills in teaching English language are examined in this article. The author offers different types of tasks for the development of oral and written forms of communication. Special attention is paid to the formation of...

Задать вопрос