How does Java create its windows?

How the JVM does this windows, I know that it has jar files and executables, etc. what I would like to know is exactly how the window is made using java, the frame around the desktop application.

Is this the standard graphics library on the machines on which it is installed?

+3
source share
3 answers

Java has two types of interface components: heavyweight and lightweight.

The heavy component is the shell for what exists in the operating system. Windows as an operating system has methods for creating windows, dialog boxes, etc.

2D- API . .

"" API Java - Swing AWT. AWT ( , ). . Swing AWT, API . Swing .

, Java , , . , API- 2D- "" Windows .

, Java, , Java2D ( , , API), Windows , , .

Java .

+7

, java.awt.Frame javax.swing.JFrame ( ), . (2002), 1.4 Frame.setUndecorated . ( Window), PL & F, Metal, . , -, , . , Sun , - , .

0

, : SWT, Java Windowing. , AWT . Eclipse. L & F, - YMMV.

The disadvantage of SWT is that you need to learn an additional API, and libraries must be available on all target platforms. For example, until recently, the OS-X version was rather incomplete and outdated (Carbon, not Cocoa).

0
source

Source: https://habr.com/ru/post/1715754/