Is Java Swing a "memory puzzle"?

I often hear that Java Swing tools are considered a “burst of memory” (like this answer ).

It...

  • A due to Swing architecture;

  • B inherent in Java memory management; or

  • C is an unsubstantiated claim that stems from a lack of understanding of how memory allocation works (for example, just because the task manager says the application allocated x MB, this does not really mean that it actually uses all of this)

I am trying to find a specific objective analysis of the requirements for the correct Swing memory compared to similar GUI tools (not necessarily Java).

+3
source share
3 answers

Swing uses quite a bit of memory, which is true, but I would not qualify it as a "burst of memory."

As one answer says, in Swing, each component is written on its own (without using the original OS widgets), this is what makes Swing portable via platforn.

The Look'n'Feel concept, from my point of view, is very good, but it has, of course, some drawbacks (memory consumption). But I believe that this drawback is largely balanced by the ability to instantly change the appearance of the application with only one line of code. There is clarity of third-party look'n'feels (some commercial, some open source) that can give your application a “friendly” look.

, , JDK ( , 6) ( ) : , Swing API, Swing , . JDK7 ( ) "Jigsaw".

+2

"" Swing, - :

Swing , , .

? , , / Swing, Swing. , SWT , , , . "" Swing "", . , SWT "" .

+4

, . , , :

  • , SWT Swing, . (, Windows) SWT . (Linux, VMware Windows), Swing SWT. : 2 , . , Swing . , , . Swing Text Field (sync) , Swing Text Field, . , SWT . Java SWT (, Eclipse IDE) Swing. . , - , , , . , ( ) .

http://public.cosylab.com/CSS/DOC-SWT_Vs._Swing_Performance_Comparison.pdf

+2
source

All Articles