A question on a Swing design component. Please see

Folks,
Please no offence meant.
If you are creating a new class in eclipse you are displayed the New Java class dialog.
Correct?
New Java Class
  Create a new Java class
Source folder  [     ]
Package:       [     ]If you click on the text field in Package:,there appears a small light bulb pops up on the left hand side of the text field.
Does anyone have any idea what this decorator is called and how can this be achieved using plain Java Swing
I would like to employ this same concept if a user enter a value in a Text Field and a small bulb appears....

That's just a label with a tooltip, probably with its visibility triggered on focus gained.
Something like (simplified):
    JLabel lab = new JLabel(lightbulbImageIcon);
    lab.setTooltip("Content assist available");
    lab.setVisible(false);
    JTextField editingField = ...;
    editingField.addFocusListener(){
        new FocusListener(){
            @Override
            public void focusGained(FocusEvent e){
                if( ContentAssitstManager.isContentAssistAvailable(e.getSource()) ){
                    label.setVisible(true);
            @Override
            public void focusLost(FocusEvent e){
                label.setVisible(false);
    };

Similar Messages

  • Question for everyone: Swing Design Patterns

    I've used kodo for many web projects, but I am currently looking at using it
    for a swing application and am having a hard time figuring out the best way
    to use it.
    My original attempt used a singleton PersistenceManager for the entire
    application that always had a running transaction. When the application
    started, the pm was created, and currentTransaction.begin() was called.
    Whenever anything was done that needed to change the JDO-persisted business
    objects, I would simply make the necessary method calls to the business
    objects. Whenever the user wanted their changes to be saved (committed)
    there was a "File->Save All" menu item that did a
    currentTransaction.commit() then a currentTransaction.begin(). This seemed
    very easy to do, and I could even bind JTextFields etc. directly to
    getters/setters and all data to and from the swing app was nice and easy. I
    see two problems with this, however:
    1) The user needs to remember to call "file->save all" from time to time,
    which is not always done
    2) It makes an all-or-nothing approach to saving data. You cannot have a
    "ok/cancel/apply" button on each window that commits only the data changed
    in that window.
    I could get rid of the "file->save all" necessity by having it auto-commit
    after certain things are done. The trouble is, I think that would probably
    be after each text field etc. looses focus and would lead to a lot of commit
    overhead as well as default fields that shouldn't really be committed to the
    database being committed.
    My next attempt was to try to make the entering/editing of data independent
    from the gets/sets/business methods on the business objects. In this
    attempt, there is still a singleton pm, but no on-going transaction. On
    each "OK" button click, transactions are begun, the information set in the
    swing components are transferred to the business objects, and the
    transaction is committed. Before long, however, it got very unwieldy to try
    to manually track how swing controls map to business object calls. I did
    find a nice pattern where there is a "BufferedValueHolder" object that you
    could use for storing information, and when a passed variable would change
    values (which you would change on your "OK" button), then it would
    automatically send the new value to the underlying business objects which
    would then be committed. This helped a lot on simple properties that can be
    modified, but fell apart when you had more complex business logic such as
    "when they hit the approve button, the approver needs to be set to the
    logged in user, the approval date must be set to the current date, and the
    item must be removed from the unapproved list". Since I can't call the
    ..approve() method on the business object when the approve button is hit
    (since it is not running in a transaction), I must move/duplicate all the
    logic of which swing fields must be changed into the UI layer, in which it
    doesn't belong.
    That's where I am so far. I thought about trying to create a new pm for
    each window/transaction, but I think that would lead to too many "this
    object not managed by this PM" exceptions. I've looked at the swing example
    in the Kodo download, but the example does not seem to fit a more complex
    application than the one provided. I also checked out JDOCentral.com, but
    couldn't find anything in their code exchange. Any suggestions would be
    very welcome.
    Nathan

    Thanks for the quick response!
    What do you mean by a DataSource class? For example, suppose you have the
    following PC class:
    public class Task {
    private Integer id;
    private String name;
    private String approvedBy;
    private Date approvalDate;
    ..... (getters and setters)
    public void approve(String approver) {
    approvedBy = approver;
    approvalDate = new Date();
    Would you have a DataSource class that is a duplicate of Task except that
    getters and setters throw properyChangedEvents? Does it help to have the
    DataSource object extend the PC object? Where would you put the approve()
    method? On the Task or the TaskDataSource object? How does the DataSource
    object know to save its information to the base Task object, by registering
    with the PM?
    I like the idea of not starting a transaction untill the DataSource changes.
    Does refreshing each PC simply require a call to PM.refresh(), or does it
    take more than that?
    Nathan
    "Alex Roytman" <[email protected]> wrote in message
    news:[email protected]...
    We use:
    - single PM
    - we use DataSource concept (proxy to percistent classes which fires
    property change events on state change) to facilitate MVC
    - Transaction started and commited per dialog box. It is started by
    listeners attached to DataSource class so we do not start transactionbefor
    each opening of a dialog box bu only when attempt is made to make a change
    to state of a PC
    - Dirtiest part is thet we have to refresh each PC instance (or sme time a
    graph of instances) before we present it for editing
    Have fun
    Alex
    "Nathan Voxland" <[email protected]> wrote in message
    news:[email protected]...
    I've used kodo for many web projects, but I am currently looking at
    using
    it
    for a swing application and am having a hard time figuring out the bestway
    to use it.
    My original attempt used a singleton PersistenceManager for the entire
    application that always had a running transaction. When the application
    started, the pm was created, and currentTransaction.begin() was called.
    Whenever anything was done that needed to change the JDO-persistedbusiness
    objects, I would simply make the necessary method calls to the business
    objects. Whenever the user wanted their changes to be saved (committed)
    there was a "File->Save All" menu item that did a
    currentTransaction.commit() then a currentTransaction.begin(). Thisseemed
    very easy to do, and I could even bind JTextFields etc. directly to
    getters/setters and all data to and from the swing app was nice and
    easy.
    I
    see two problems with this, however:
    1) The user needs to remember to call "file->save all" from time to
    time,
    which is not always done
    2) It makes an all-or-nothing approach to saving data. You cannot havea
    "ok/cancel/apply" button on each window that commits only the datachanged
    in that window.
    I could get rid of the "file->save all" necessity by having itauto-commit
    after certain things are done. The trouble is, I think that wouldprobably
    be after each text field etc. looses focus and would lead to a lot ofcommit
    overhead as well as default fields that shouldn't really be committed tothe
    database being committed.
    My next attempt was to try to make the entering/editing of dataindependent
    from the gets/sets/business methods on the business objects. In this
    attempt, there is still a singleton pm, but no on-going transaction. On
    each "OK" button click, transactions are begun, the information set in
    the
    swing components are transferred to the business objects, and the
    transaction is committed. Before long, however, it got very unwieldy totry
    to manually track how swing controls map to business object calls. I
    did
    find a nice pattern where there is a "BufferedValueHolder" object thatyou
    could use for storing information, and when a passed variable wouldchange
    values (which you would change on your "OK" button), then it would
    automatically send the new value to the underlying business objectswhich
    would then be committed. This helped a lot on simple properties thatcan
    be
    modified, but fell apart when you had more complex business logic such
    as
    "when they hit the approve button, the approver needs to be set to the
    logged in user, the approval date must be set to the current date, andthe
    item must be removed from the unapproved list". Since I can't call the
    .approve() method on the business object when the approve button is hit
    (since it is not running in a transaction), I must move/duplicate allthe
    logic of which swing fields must be changed into the UI layer, in whichit
    doesn't belong.
    That's where I am so far. I thought about trying to create a new pm for
    each window/transaction, but I think that would lead to too many "this
    object not managed by this PM" exceptions. I've looked at the swingexample
    in the Kodo download, but the example does not seem to fit a more
    complex
    application than the one provided. I also checked out JDOCentral.com,but
    couldn't find anything in their code exchange. Any suggestions would be
    very welcome.
    Nathan

  • Tabs not appearing on ruler of Report Designer Component

    I'm using the Report Designer Component in a Visual Basic application. Everything seems to be working fine except for some reason I can't seem create a tab on the ruler. I believe that all I should have to do is click on the ruler, is that correct?
    Has anyone else had this problem??

    Please re-post if this is still an issue to the Legacy Application Development SDKs Forum or purchase a case and have a dedicated support engineer work with you directly

  • Hello Anybody, I have a question. Can any of you please suggest me how to make an xml file from the database table with all the rows? Note:- I am having the XSD Schema file and the resulted XML file should be in that XSD format only.

    Hello Anybody, I have a question. Can any of you please suggest me how to make an xml file from the database table with all the records?
    Note:- I am having the XSD Schema file and the resulted XML file should be in that XSD format only.

    The Oracle documentation has a good overview of the options available
    Generating XML Data from the Database
    Without knowing your version, I just picked 11.2, so you made need to look for that chapter in the documentation for your version to find applicable information.
    You can also find some information in XML DB FAQ

  • Example "Designing Component-Based Web Dynpro Applications" in NWDS 7.1

    hi,
    importing Designing Component-Based Web Dynpro Applications.zip into NWDS 7.1, I get ~ 200 errors.
    after repairing the projects (in WEB-Dynpro View) ands migrating, there are 76 errors:
    Component 'CustomersUIComp': Used component/component interface is missing: ComponentInterfaceImplementation com.sap.cd355.comp.adv.modelcomp.ModelCompInterface Hint: Check availability of public part archive     LocalDevelopmentcd355compadvui_final~sap.com/src/packages/com/sap/cd355/comp/adv/ui/customers     CustomersUIComp.wdcomponent     ModelComponent     1240309796017     1800
    TextView 'city_editor.text': Context attribute 'CustomersView.Customers.Address.city' does not have a type and cannot be bound to a UI element. Hint: Remove the binding or bind a context element matching the property's type.     LocalDevelopmentcd355compadvui_final~sap.com/src/packages/com/sap/cd355/comp/adv/ui/customers     CustomersView.wdview     text     1240309796032     1821
    ViewUsage 'com.sap.cd355.comp.adv.ui.customers.CustomersUICompInterfaceViewCustomersUIComponentUsage1': Embedded View/InterfaceView is missing. InterfaceView com.sap.cd355.comp.adv.ui.customers.CustomersUICompInterfaceView Hint: Repair Window     LocalDevelopmentcd355compadvmaster_final~sap.com/src/packages/com/sap/cd355/comp/adv/master     MasterComp.wdwindow     Unknown     1240309796503     1823
    hermann

    Seems like your example requires some other DCs as well, which don't appear to be part of the zip you mentioned.

  • Visual Swing Designer (for Eclipse)

    Hi there
    We've developed a client software with JBuilder. Now we want to move
    the whole project to eclipse.
    Is there a good plugin for Eclipse to design Swing applications? I haven't found one so far.
    JBuilder has a Swing designer, and it is very usable for us. Eclipse
    hasen't such a Swing designer...
    It could also be a external tool, to design our Swing Panels. But it
    has to be a visual Designer tool for swing, like the one for VisualStudio and co.
    Does anybody know a good Designer WORKING Tool? Maybee as plugin for eclipse?
    Greetings,
    Adrian

    Hi,
    It would be good to have some feedback about Swing GUI builders for Eclipse, are they usable and good. I heard much good things on Eclipse and am curious to try (althought NetBeans are still very good for me), but I develop Swing application and porting to SWT is unacceptable for me (it is not so advanced as Swing and I need many features that are in Swing only).

  • Oracle Designer Problem Please help me

    Sir,
    1) I created a database
    2) Run>cd d:\Oracle_home\repadm61\admin\@ckqa
    @ckparams.txt
    @ ckvalqa
    @ ckcreate
    3)Opened Repository Administration Utility
    Log in as 'repos_manager/repos_manager@orcltest'
    Installed Repository.
    4) Opened Oracle 9i Designer. I am able to connect
    as 'repos_manager/repos_manager@orcltest'
    But I am not able to logon as any other user in same database/ any other user in different database. Why?
    Please help me.
    regards
    Mathew

    duplicate thread, see this one -> Re: Oracle Designer Problem Please help me

  • Helo , my secret question and apple id was blocked, please help me repair my apple id , i want to keep using this my apple id

    dear ...
    please help meeee.... my my secret question and apple id was blocked, please help me repair my apple id , i want to keep using this my apple id.
    please helppppp meeeeeee......
    <E-mail Edited by Host>

    Dendyhebatz wrote:
    dear ...
    please help meeee.... my my secret question and apple id was blocked, please help me repair my apple id , i want to keep using this my apple id.
    please helppppp meeeeeee......my email & apple id XXXXXXX
    Try changing your Apple ID password at iforgot.apple.com first.
    Also:
    How to reset your Apple ID security questions.
    Go to appleid.apple.com, click on the blue button that says 'Manage Your Apple ID'.
    Log in with your Apple ID and password. (If you have forgotten your Apple ID password, go to iforgot.apple.com first to reset your password with a password recovery email)
    Go to the Password & Security section on the left side, and click on the link underneath the security questions that says 'Forgot your answers? Send reset security info email to [email]'.  This will generate an automated e-mail that will allow you to reset your security questions.
    If that doesn't work, or  there is no rescue email link available, then click on 'Temporary Support PIN' that is in the bottom left side, and generate a 4-digit PIN for the Apple Account Security Advisor you will be contacting later.
    Next, go to https://getsupport.apple.com
    (If you see a message that says 'There are no products registered to this Apple ID, simply click on 'See all products and services')
    Choose 'More Products & Services', then 'Apple ID'.
    A new page will open.
    Choose 'Other Apple ID Topics', then 'Forgotten Apple ID Security Questions'.
    Click the blue 'Continue' button.
    Select the contact option that suits your needs best.

  • Dear Gents ,  till now i can't reset my security questions and i forget the answers please do something for me and find the below as per your request .  note : i can't purchase any thing also  , thanks in advance.  BR

    Dear Gents ,
    till now i can't reset my security questions and i forget the answers please do something for me and find the below as per your request .
    note : i can't purchase any thing also  , thanks in advance.
    BR
    i sent my issue to you under this subject :
    RE: Please verify that we have the right address for you
    my email in [email protected]

    Copied from the link provided.
    Note: The option to send an email to reset your security questions and answers will not be available if a rescue email address is not provided. You will need to contact iTunes Store support in order to do so.

  • HT5312 I forget my securety questions what can i do . Please anwser my question

    I forget my securety questions what can i do . Please anwser my question

    The page that you;ve posted from has instructions for how to reset them i.e. if you have a rescue email address set up on your account then steps 1 to 5 half-way down that page should let you reset them.
    If you don't have a rescue email address then you will need to contact iTunes Support / Apple to get the questions reset.
    Contacting Apple about account security : http://support.apple.com/kb/HT5699
    When they've been reset (and if you don't already have a rescue email address) you can then use the steps half-way down the HT5312 page that you posted from to add a rescue email address for potential future use

  • Hey Apple I want to buy my first time there and do it and do not remember the security question that I want to. Please tell us what they can do.

    Hey Apple
    I want to buy my first time there and do it and do not remember the security question that I want to.
    Please tell us what they can do.

    Welcome to the user to User Technical Support Forum provided by Apple
    Houshiar wrote:
    do not remember the security question
    See Here > Apple ID: Contacting Apple for help with Apple ID account security
              Ask to speak with the Account Security Team...
    Or Email Here  >  Apple  Support  iTunes Store  Contact
    More Info >  Apple ID: All about Apple ID security questions

  • HT5312 I forgot answer question No. secret in my account Please re Zbt question No.

    I forgot answer question No. secret in my account Please re Zbt question No.

    You need to ask Apple to reset your security questions; ways of doing so include clicking here and picking a method for your country, and filling out and submitting this form.
    (96077)

  • I forgot answer question No. secret in my account Please re Zbt question No.

    I forgot answer question No. secret in my account Please re Zbt question No.

    The Three Best Alternatives for Security Questions and Rescue Mail
        1. Use Apple's Express Lane.
              Go to https://expresslane.apple.com ; click 'See all products and services' at the
              bottom of the page. In the next page click 'More Products and Services, then
              'Apple ID'. In the next page select 'Other Apple ID Topics' then 'Forgotten Apple
              ID security questions' and click 'Continue'. Please be patient waiting for the return
              phone call. It will come in time depending on how heavily the servers are being hit.
         2.  Call Apple Support in your country: Customer Service: Contacting Apple for support or
              Apple ID- Contacting Apple for help with Apple ID account security. Ask to speak to
              Account Security.
         3.  Rescue email address and how to reset Apple ID security questions.
    How to Manage your Apple ID: Manage My Apple ID

  • HT1937 I forger my app security questions what I have to do please ?

    I forger my app security questions what I have to do please ?

    You need to ask Apple to reset your security questions; ways of contacting them include clicking here and picking a method for your country, phoning AppleCare and asking for the Account Security team, and filling out and submitting this form.
    (100820)

  • What are the supported Macintosh Operating System versions for IBM SPSS Statistics 18,19 and 20?   Question  I would like to know what are the supported Macintosh Operating system versions for IBM SPSS Statistics versions 18, 19 and 20? Answer  Please see

    What are the supported Macintosh Operating System versions for IBM SPSS Statistics 18,19 and 20?
    Question
    I would like to know what are the supported Macintosh Operating system versions for IBM SPSS Statistics versions 18, 19 and 20?
    Answer
    Please see the list below:
    - IBM SPSS Statistics 18 and 19 releases are supported on Apple Macintosh OS 10.5 (Leopard) and 10.6 (Snow Leopard) with Intel processor.
    - IBM SPSS Statistics 20 release is supported on Apple Macintosh OS 10.6 (Snow Leopard) and 10.7 (Lion) with Intel processor.
    - The IBM SPSS Statistics versions 18 and 19 are not supported on Mac OS 10.7 (Lion).
    THIS MEANS THAT TO USE LION ONE FIRST HAS TO UPGRADE TO SPSS STATISTICS 20.

    Whilst the 2012-02-15 edition of IBM's matrix does not mention Lion, a few users have noted that:
    • 18.0 can be troublesome
    • an updated version of 18.x should be better.
    Related files
    PASWStatistics_1 803_Mac_Patch.dmg and IBM SPSS Statistics 18.0.3.4 Hotfix Mac.zip are no longer available from the spss.com domain, and I could not find them in an IBM domain. If you download from unofficial sources, proceed with caution.
    Related pages
    In Apple Support Communities:
    • will PASW (SPSS) 18 work with LION
    • PASW statistics 18 crashes every time
    • Java Virtual Machine & SPSS 18 with a question from me.
    Elsewhere:
    • SPSS on Lion « Decorator Pattern
    • SPSS / PASW Mac Patch 18.0.3 and Graphing Fix | The Personal Website of Philip Fizur
    • Patching PASW 18 (or SPSS 18) for Mac OS X (Leopard, Snow Leopard, Lion) to version 18.0.3.1
    • and other sources, including one domain that I treat as reputable but I'll respectfully not share that link here.
    At a glance, you might find that 18.0.3.4 is compatible with Lion.

Maybe you are looking for

  • Problem with dynamic LOV and function

    Hello all! I'm having a problem with a dynamic lov in APEX 3.0.1.00.08. Hope you can help me! I have Report and Form application. On the Form page i have a Page Item (Popup Key LOV (Displays description, returns key value)). When i submit the sql cod

  • I wrongly imported DVCPRO 50 files into a 720p HD sequence

    Hi, I wrongly imported clips originally shot in DVCPRO 50 PAL files into my default 720p HD sequence into a 720p HD sequence and when I discovered that I started a DVCPRO 50 sequence and imported the clips from the HD seq but they all look a bit out

  • First page empty - how can I delete it?

    Not sure if I am in the right forum but I'll try. I wasn't able to get into another forum. I am using Livecycle designer 8.05. I created a form and it worked fine. Now I moved the last page to the front and a Master page appeared, which is empty (not

  • Extending a network and the new guest access feature

    Hi- Currently, I have 3 of the 802.11n Airport Extremes-One creating the network, and two extending the network. I would like to get the new feature that allows you to setup guest access--- My question: Will I be able to purchase ONE of the new Airpo

  • JoikuSpot Premium NOW UNAVAILABLE after purchase

    On this date, and time: 14 April 2011 4:35:29 PM EEST I purchased from the Ovi Store via operator billing: Vodacom Group Pty Ltd phone bill The software: JOIKUSPOT PREMIUM WiFi HotSpot An error which could not be resolved on my phone and memory card