Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4567556
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T18:56:52+00:00 2026-05-21T18:56:52+00:00

I frequently hear that Java’s Swing toolkit is considered a memory hog (such as

  • 0

I frequently hear that Java’s Swing toolkit is considered a “memory hog” (such as this answer).

Is this…

  • A due to Swing’s architecture;

  • B inherent in Java’s memory management; or

  • C an unfounded claim that stems from a lack of understanding how memory allocation works (e.g. just because the Task Manager says an application has allocated x MB, it does not actually mean that it is actually using all of it)

I’m trying to find a concrete, objective analysis about Swing’s true memory requirements as compared to similar GUI toolkits (not necessarily Java).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T18:56:53+00:00Added an answer on May 21, 2026 at 6:56 pm

    Swing uses quite a lot of memory that’s true, but i would not qualify it as a “memory hog”.

    As one reply says, in Swing, every component is painted by itself (no use of the OS original widgets), this is what makes Swing portable across platforn.

    The Look’n’Feel concept is, from my viewpoint, very good, but it has of course some disadvantages (memory consumption). But I find this disadvantage largely counter-balanced by the possibility to instantly change the look and feel of an application with just one line of code. There are plainty of 3rd-party look’n’feels out there (some commercial, some open source) that can give some “friendly” look to your application.

    Also, memory usage is also originated in the way JDK (until 6 at least) loads (or pre-loads) classes in memory: as far as I could see, at the second you run some Swing API in your code, the whole Swing library gets loaded altogether, even though you may not need to all widgets. That may possibly change in JDK7 (which I haven’t tested) and “Jigsaw”.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I hear that tr1::result_of gets used frequently inside of Boost... I'm wondering if there
I frequently hear X% of software project fail due to bad requirements. The X
I frequently hear Service-Oriented Architecture (SOA) being tossed around as a buzzword among non-technical
I hear this term used quite frequently, but have yet to see it specified
I frequently find myself writing code like this: List<int> list = new List<int> {
I frequently encounter some definitions for Win32API structures (but not limited to it) that
I frequently run into problems of this form and haven't found a good solution
Frequently I am aligning text such as: To: 07/02/2010 From: 07/02/2010 Id like it
Frequently I have run into a problem when installing gems that provides a problem
I frequently come across this problem. I have a file: something something2 something3 which

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.