Is there any way to wait for a value without using JDialog or JOptionPane?

I am implementing a dictionary program by detecting word in a JTextPane and asking a user to choose one of available meanings from JOptionPane or JDialog. The program runs under a while-loop until all dictionary words are detected or a user clicks cancel.
However, I don't want to use JDialog or JOptionPane because it is sometimes annoying to have a popup window on every detected dictionary word.
So, I use JList with Buttons on the same Frame as the JTextPane. However, now, the program does not stop when it detects a dictionary word. It just uses a default value of the JList for translating word to meaning.
Is there any way I can simulate the JDialog or JOptionPane without using it?
I mean I'd like to stopp the program temporary, wait for an answer from other components, and then continue to detect the next dictionary word.
Thank you.

I'm probably reading this all wrong, but instead of the while loop,
the method just looked for a dictionary word from a particular caretPosition,
so, to start, it would be findWord(0)
when found, add whatever to wherever, note the caretPostion at the end of the 'found' word, and method returns.
when the user selects whatever button, the button's actionListener also calls the method again, using the noted caretPosition
findWord(42);
so, it starts searching from 42 (instead of the start)
basically it is event driven
findWord sets the button/s
click a button starts findWord

Similar Messages

  • Is there any way to get my files back without using Time machine?

    I used CCleaner without knowing it. It erased my download folder totally. I don't have any time machine.
    any suggesion?
    Sonny

    Sonny operating any computer without a backup plan is just not wise and you are now probably going to pay a minor price. What would happen if you lost all of  your photographs, music and personal records? PLEASE begin a backup plan immediately, there is absolutely no excuse not to. I would recommend first starting out by buying an external HD and using Time Machine and then get a second external HD to create another backup using cloning software such as SuperDuper or Carbon Copy Cloner (both less than $30). For less than $200 you can have a viable and safe backup plan. The reason it's wise to have redundant backups is because a backup can fail too, I've had it happen, thank heavens I had 2 backups which saved the day.

  • Is there any way to set up Firefox sync without using a PC?

    I am try to set up Firefox to sync between my tablet and phone on android without having to use a PC as an intermediary. I Is this possible? I I don't see any option to create an account or enter a sync code on the android version.

    You will require a computer. Sorry for any inconvenience.

  • Is there any way to write a Java prg without main()

    I would like to know Is there any way to write a Java program without using main() function.

    > i am unable to execute the program ..............i
    think there must be a main method through with the
    program starts
    The program can be compiled and run. After running it, you'll see "They'll kill you for that" followed by something like "java.lang.NoSuchMethodError: main" and finally someone with a big Volvo will burst into your room and runs you over.

  • Any way to open new browser window without using image maps?

    Is there any way to open new browser window without using image maps? My code works fine in Firefox, but not in IE. There are 2 problems in IE: 1st is that the thumbnail images move up within their own borders & 2nd that when you click on an image it does open up a new browser window, but also redirects to the index page (in this case it's just a placeholder index page - the new one I've called index_new.html for the time being).
    Here is the link:
    http://www.susieharperdesigns.com/gallery_beads.html
    Any help is greatly appreciated.

    Your missing a value on the HREF.  In your code you have this:
    <area shape="rect" coords="-24,-9,106,144" href=" " onclick="MM_openBrWindow('gallery_bead1.html','','width=255,height=360')" />
    </map></div>
    and it should be this:
    <area shape="rect" coords="-24,-9,106,144" href="javascript:void()" onclick="MM_openBrWindow('gallery_bead1.html','','width=255,height=360')" />
    </map></div>
    If you fix the code on all your beads, it should work.
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    http://alt-web.com/
    http://twitter.com/altweb
    http://alt-web.blogspot.com

  • Is there any way to search for a term using the Firefox search field, and have the results automatically open in a new tab?

    Is there any way to search for a term using the Firefox search field, and have the results automatically open in a new tab? When there was support for Google Toolbar, I was able to do this; now, whenever I want to search for something, I have to open a new tab to do it, and cut-and-paste my search into the search field in the new tab. I used to be able to highlight, drag, and drop something into the search field and have it automatically open in a new tab. This is enough for me to switch to Chrome . . .

    Set a preference to have searches from the Search Bar (upper right) automatically open all searches in a new tab
    #type '''about:config''' in the URL/Location/Address bar and press the Enter key
    #if you see a warning, accept it (promise to be careful)
    #Filter = '''browser.search.openintab'''
    #in the lower panel, double click the item (or right-click and choose "Toggle") to change the value to "true"
    #close the about:config tab and test
    #See:
    #*For help with opening/using about:config, also see: http://kb.mozillazine.org/About:config
    #*Also see: http://kb.mozillazine.org/About:config_entries (click on "Browser", scroll down to browser.search.openintab)
    '''Search Bar''': http://support.mozilla.com/en-US/kb/Search+bar
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''
    About Google toolbar............
    Google decided that they will no longer produce the Google Toolbar for Firefox 5 and newer version. It is best to move on to other alternatives than to try any "hacks" to the toolbar that may or may not perform in the future. Future versions of Google toolbar will only work with IE7-9. Google Toolbar is not available on any other browser, even Google's own browser.
    *http://googletoolbarhelp.blogspot.com/2011/07/update-on-google-toolbar-for-firefox.html
    *https://support.mozilla.com/en-US/kb/google-toolbar-not-compatible-firefox?s=google+toolbar&r=0&as=s
    *http://www.google.com/support/toolbar/bin/answer.py?answer=1342452&topic=15356%29
    *Google Toolbar 8 FAQ (IE only): https://www.google.com/support/toolbar/bin/answer.py?hl=en&answer=1111588
    '''''To access your Google Bookmarks visit''''' www.google.com/bookmarks.
    Alternatives:
    *http://kb.mozillazine.org/Using_Google_Toolbar_features_without_toolbars
    *https://addons.mozilla.org/en-US/firefox/addon/googlebar-lite/
    *https://addons.mozilla.org/en-US/firefox/addon/gbookmarks-google-bookmarks-fo/

  • Is there any way we can set default value for a Date Attribute to current date in Master Data Services

    Is there any way we can set default value for a Date Attribute to current date in Master Data Services.
    I as well wants to know that is there any posibility to show Calendar control while input data into respective date attributes.
    Thanks.

    Hi Anagha,
    So far i havent found any way to set todays date by default from MMI, but i guess this flow should work as workaroud
    1. Add buisness rule which can set a default value when Date = NULL/Blank
    2.get the entity table ,use -select EntityTable from mdm.tblEntity where Name = '<enter entity name>'
    3.Go to that table and add a after update trigger like
    if uda_<entityid>_<attributeid(Date attribute)> = default value
    update uda_<entityid>_<attributeid(Date attribute)> =getdate() where id = <LastUpdatedRow>
    I will check on this too from my side.
    By the way AFAIK i dont think so calendar control integration is possible .

  • I have a 2012 iMac, running OS X Yosemite 10.10.2. Is there any way to scan for malware without buying a program?

    I have a 2012 iMac, running OS X Yosemite 10.10.2. Is there any way to scan for malware without buying a program?

    Have you been having some problems that make you think you may have malware installed?
    Download and run Etrecheck.  Copy and paste the results into your reply. Etrecheck is a diagnostic tool that was developed by one of the most respected users here (and recommended by Apple Support personnel) in the ASC to help identify the more obvious culprits that can adversely affect a Mac's performance.

  • I bought an LG phone and a $35 dollar plan card. Less than a week later it said I was out of time for texts. Apparently it only gave me minutes, not the plan I wanted. Is there any way I can get the plan without paying again?

    I bought an LG phone and a $35 dollar plan card. Less than a week later it said I was out of time for texts. Apparently it only gave me minutes, not the plan I wanted. Is there any way I can get the plan without paying again?

    So you bought a plan and used it all and want another one for free? I understand you thought it had more texts or whatnot but they won't do that since you already used the other plan.
    That's like going to McDonalds and ordering a double cheeseburger, them giving you a double cheeseburger, you eating it and then realizing you wanted a double quarter pounder and expecting them to give it to you free.

  • Is there any way to search for bad blocks in my Macintoshi HD without formating it? I'm experiencing too much I/O problems...

    Is there any way to search for bad blocks in my Macintoshi HD without formating it? I'm experiencing too much I/O problems...

    Check the drive health with the free demo of SMART Utility.
    http://www.volitans-software.com/smart_utility.php
    Reformatting and zeroing out might keep a drive going a bit longer, but once bad blocks become noticeable, it's not a drive you should trust any longer.

  • Is there any way to recover ePrinter account email by using a ePrinter e-mail address?

    My problem is as follows, I registered my printer onto ePrintCenter and set custom email address to my printer. But, I logged out from the ePrintCenter and sine that time I couldn't login into the ePrintCenter any more as the system says that the e-mail address I set for ePrinterCenter is not used in the system.
    So, I have my ePrinter e-mail, is there any way to recover ePrintCenter email address by using the printer email?
    Thank you, Agrifert.

    Hi Agrifert,
    Unfortunately its not possible to retrieve the email address you used to create your ePrintCenter account from the printer's ePrint email address. Are you still unable to log in to your ePrintCenter account? I'll wait to hear back from you before suggesting any further actions.
    Best.
    If my reply helped you, feel free to click on the Kudos button (hover over the "thumbs up").
    If my reply solved your problem please click on the Accepted Solution button so other Forum users may benefit from viewing the post.
    I am an HP employee.

  • Is there any way to create a HTTP_AAE Receiver without a path in NW PO 7.31

    Hi ,
    Does anyone know how to create a HTTP_AAE Receiver without a path??
    We are in a phase of migrating Interfaces from PI 7.1 to PO 7.31(Java Only).
    For one of the Interface in PI 7.1 there is a RFC Destination for vendor communication through HTTPS connectivity  :
    TargetHost: IP Address
    Post: value
    Path Prefix: Blank
    During migration  requirment is to keep the Path field BLANK of the Communication Channel,however since  PO has mandatory path field   a "/" is been provided, because of which data post fails.
    PI:  https://IP:9443
    PO:  https://IP:9443/  (Since Path Prefix is mandatory)
    As per my understanding The data is supposted to be posted directly to the IP (https://IP:9443) however it is getting posted to (https://IP:9443/) where the service is not available. For Reference attached relevant screenshots.
    Is there any way to  create a HTTP_AAE Receiver without a path. Need ardent support and suggestions
    regarding this.
    Regards
    Riju

    Hi,
    For Service auto- PO from PR, you need to activate Automatic Purchase order creation for Service requisitions in ML91 t.code.
    Note:
    For material :automatic PO creation from PR, follow the steps.
    1) Material Master purchasing view tick automatic PO check box
    2) Vendor Master purchasing view tick automatic PO check box.
    3) Maintain Source list for Vendor & Material.(ME01)
    4) Maintain Purchase Info Record.(ME11)
    5) Create a Purchase Requisition.(ME51)
    6) Use T.Code: ME59 & execute for PR for vendor, you will be able to create automatic PO.
    During creation of PR , select check box of Source Determination in the 1st screen of ME51
    Ensure that Purchase Info Record should be there.
    If you have more than one vendor then fixes only one vendor in source list.
    Regards,
    Biju K

  • Is there any way to an index that can be used to include the "OR condition "?

    Hello I have some questions.
    The test was conducted in the following procedure .
    create table test
    c1 varchar2(10),
    c2 varchar2(10),
    primary key(c1)
    create index test_idx1 on test(c2);
    Command> explain select * from test where c1 = 'AAAAAAAAAA' or c2 = 'AAAAAAAAAA';
    Query Optimizer Plan:
      STEP:                1
      LEVEL:               1
      OPERATION:           RowLkRangeScan
      TBLNAME:             TEST
      IXNAME:              TEST
      INDEXED CONDITION:   <NULL>
      NOT INDEXED:         TEST.C2 = 'AAAAAAAAAA' OR TEST.C1 = 'AAAAAAAAAA'
    Command>
    Command> explain select * from test where c1 = 'AAAAAAAAAA' and c2 = 'AAAAAAAAAA'
    Query Optimizer Plan:
      STEP:                1
      LEVEL:               1
      OPERATION:           RowLkRangeScan
      TBLNAME:             TEST
      IXNAME:              TEST
      INDEXED CONDITION:   TEST.C1 = 'AAAAAAAAAA'
      NOT INDEXED:         TEST.C2 = 'AAAAAAAAAA'
    Command>
    By including the "OR condition " in this test does not use the index.
    Is there any way to an index that can be used to include the "OR condition "?
    Thanks.
    GooGyum.

    A database cannot in general use indexes in this way for an 'or' involving two different columns. However, for this specific example one can easily rewrite the query using 'UNION' to use the relevant indexes while still giving the same (correct) result:
    Command> explain select * from test t1 where t1.c1 = 'AAAAAAAAAA' union select * from test t2 where t2.c2 = 'AAAAAAAAAA';
    Query Optimizer Plan:
      STEP:                1
      LEVEL:               1
      OPERATION:           RowLkRangeScan
      TBLNAME:             TEST
      IXNAME:              TEST
      INDEXED CONDITION:   T1.C1 = 'AAAAAAAAAA'
      NOT INDEXED:         <NULL>
      STEP:                2
      LEVEL:               2
      OPERATION:           RowLkRangeScan
      TBLNAME:             TEST
      IXNAME:              TEST_IDX2
      INDEXED CONDITION:   T2.C2 = 'AAAAAAAAAA'
      NOT INDEXED:         <NULL>
      STEP:                3
      LEVEL:               1
      OPERATION:           OrderBy
      TBLNAME:             <NULL>
      IXNAME:              <NULL>
      INDEXED CONDITION:   <NULL>
      NOT INDEXED:         <NULL>
      STEP:                4
      LEVEL:               2
      OPERATION:           UnionMergeSort
      TBLNAME:             <NULL>
      IXNAME:              <NULL>
      INDEXED CONDITION:   <NULL>
      NOT INDEXED:         <NULL>
    Maybe you can apply a similar trick? If you know there is no possibility of duplicate rows then you can further optimise this (in terms of performance) by using UNION ALL.
    Chris

  • My iphone has turned off and is now not working. I plugged it into my computer and it said it was in recovery mode and i had to restore it to fix it. Is there any way i can fix this problem without loosing all my files and photos through restoring it?

    My iphone has turned off and is now not working. I plugged it into my computer and it said it was in recovery mode and i had to restore it to fix it. Is there any way i can fix this problem without loosing all my files and photos through restoring it?

    There's only one thing you can do: make an appointment with Apple genius at the Apple retail store for a out of warranty replacement.

  • Is there any way to set the SCCM system to use local time instead of UTC?

    We have ConfigMgr 2012 in our environment. We are in EST.
    Is there any way to set the SCCM system to use local time instead of UTC?
    When we try to deploy packages, if you don’t specify the time, it reverts to UTC which for us is off by 5 hours.

    Which times are you talking about? Deployment start times or deadlines? Those could be set to UTC *or* client local time.
    Torsten Meringer | http://www.mssccmfaq.de

Maybe you are looking for

  • Not able to get the current data from the screen

    Hello All, I have created a table view on a value node.  I edit a field which has a date F4 help or a field DDLB and click SAVE. In the save event handler I am using get first statement in the loop and when I see the contents of the entity it is the

  • How can I use time machine to recover my iWeb09 files?

    I read that iWeb stores one's website pages in the domain folder which can be located at ~/Library/Application Support/iWeb. Can I use time machine to recover my iWeb09 files? If so, how? -I tried. I entered my Time Machine back up, and went back in

  • Photoshop CS6 Nudging 10 pixel problem

    Hi. I have identified a major problem using CS6. When nudging folders (filled with layers) around in Photoshop. Holding the shift key at the same time as pressing an arrow usaully nugdes content 10 pixels. However, pressing the arrow key in quick suc

  • Record audio from microphone in .swf

    Hello i need to record audio with help of microphone, can any 1 tell me how it is possible and what is the possible way to do this. I am having flash 8 and flash communication(media) server 2.0 Please let me know which are the possible ways to this t

  • How to Identify Last  Command Issued by user??

    Hi Everybody, I need to create a form in which the current state of the form depends upon the last command issued by the user. Suppose if user clicks 'delete record' or 'insert record' or 'enter-query' or something else. So, how to identify the last