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

  • SEARCH
  • Home
  • 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 8250005
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T23:44:15+00:00 2026-06-07T23:44:15+00:00

In a browser if I’m using javascript it’s fairly straight forward to traverse the

  • 0

In a browser if I’m using javascript it’s fairly straight forward to traverse the DOM. Unpacking it from the top down is just a series of calls, and finding individual elements is easy because of id# tags.

Swing components have a treelike structure similar to HTML. What’s the best methodology for traversing that structure to find objects inside of it? Or should I simply stick to creating local field references to the objects that I care about?

Assuming you have a user interface that has data in it, and some code that’s interested in querying those components to find out what their state is, how would you manage “finding” those components in the Swing DOM?

  • 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-06-07T23:44:17+00:00Added an answer on June 7, 2026 at 11:44 pm

    A HTML DOM is a tree data structure, which doesn’t provide much behavior, and that uses node types that are not under your control.

    A Swing tree of components is a tree of rich objects, containing objects of types that you create, and which should provide the behavior you need. You should apply the OO principles to the elements of this tree (panels, etc.): encapsulation, law of demeter, composition, etc.

    You shouldn’t have to traverse a tree of Swing components to find the one you want. This would be a sign of poor design and lack of encapsulation. The elements of the tree should collaborate, reference each other, call appropriate methods to do their job.

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

Sidebar

Related Questions

I create a secondary browser window with Javascript code, using the window.open function, and
I have browser client Javascript which opens a WebSocket (using socket.io) to request a
I want to call browser window resize method using jquery from with in iframe.
jQuery provides a browser neutral library for accessing and manipulating the DOM. This is
I'm writing some browser side dynamic functionality and using HTTP Basic Auth to protect
I just upgraded my browser to Safari 4 and find that our website is
Which browser suits best from developers point of view,Firefox or Internet explorer.
I'm developing a browser-based mobile app built on top of jQuery Mobile, and some
The browser on the iPhone is capable of using advanced web technologies introduced in
When Browser completes formatting a page using CSS and HTML etc.. Where will be

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.