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 60205
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T18:07:32+00:00 2026-05-10T18:07:32+00:00

As a followup to my question about the java.awt.Component.getName() property , I’m wondering if

  • 0

As a followup to my question about the java.awt.Component.getName() property, I’m wondering if there is a way of squirreling an arbitrary object somewhere in a Component, similar to the tag property in .NET? This would be really handy for any code that does work to a component but doesn’t necessarily know what that component is.

For example, say I’m trying to implement an application-wide help system that knows to look at any component currently pointed to by the mouse, reach into that component and pull out it’s help text and display it in it’s own pane on the screen (no, I don’t want to use a tooltip). My answer currently is to use the Name (getName()/setName()) to store the help text, and this will work, but the Name has to be a string. If I wanted to get fancier and store anything other than a string, I think I’d be stuck.

  • 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. 2026-05-10T18:07:32+00:00Added an answer on May 10, 2026 at 6:07 pm

    I generally create a hash and put (component, cookie) whenever I add a component to the screen. When you need your cookie object back (in an event perhaps), the event always gets a copy of the component, and then you are just a get(component) away from your cookie.

    In some extreme conditions, I’ve subclassed the control and just added a field. It’s a quick and dirty fix since subclassing the component is just like a few lines of code and can go in the same class the file where you are generating your screen. This is only useful if you just need to store your data connected to a single type of control.

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

Sidebar

Ask A Question

Stats

  • Questions 69k
  • Answers 69k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer The easiest way is to use System.Xml.XmlDocument or System.Xml.Linq.XDocument to… May 11, 2026 at 12:33 pm
  • added an answer This code works (but not with comment) : { scopeName… May 11, 2026 at 12:33 pm
  • added an answer See the MSDN docs for the LoadIFilter function - you… May 11, 2026 at 12:33 pm

Related Questions

As a followup to my question about the java.awt.Component.getName() property , I'm wondering if
As a follow up to my previous question , I am wondering how to
As kind of a followup to this question I've gotten a solution working on
As a follow up to this question: Developing a online exam application, how do
As a follow up to an earlier question that attracted a whole zero answers,
This is a follow-up to the question: Should the folders in a solution match
I'm stuck deciding how to handle exceptions in my application. Much if my issues
I have a WinForms .NET app that, according to the Vista Task Manager with

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.