Signalling between two Windows

I am not sure how to signal between two Windows created in the same Thread.
Suppose I have two Windows, WindowA and WindowB (either is a descendent from the Window hierarchy - ie. JFrame, JDialog, etc.).
WindowB can be instantiated with different parameters that cause it to look different.
I want to do something like this in a method in my WindowA class: (pseudo-code)
for int 1 to n
hide this window; (i.e. WindowA)
instantiate and display a new WindowB object (with xxxxx parameters)
wait for WindowB to signal this WindowA object that it should
now create a new WindowB object and display that new object
somewhere in Class code for WindowB
signal WindowA;
How do I set up a "wait and signal" between the two Windows? Without it, WindowA will keep going through the for loop creating new Windows immediately -> I would like it to wait until WindowB signals that it is ok to do so.
Thanks for any help.
-TJW

Here's an example:
class CreateWindows {
     int count = 0;
     int limit = 5;
     public CreateWindows(int limit) {
          this.limit = limit;
          create();
     void create() {
          if (++count < limit) {
               new WindowA(new SignalListener() {
                    public void signal() {
                         create();
interface SignalListener {
     void signal();
class WindowA {
     public WindowA(SignalListener listener) {
          // do things
          listener.signal();

Similar Messages

  • How can we navigate between two windows of same component in webdynpro ABAP

    Hi
    how can we navigate between two windows( not views ) of same component in webdynpro ABAP. its an urgent requirement
    Thanks in advance.
    Regards
    Laeeq

    Hi Laeeq,
    You cannot navigate between windows of one component. You can only call a dialog box showing the contents of a second window, or you can embed the contents of a window of a different component.
    Just add all the views you need to the one and only main window of the component.
    Ciao, Regina

  • Drag and Drop between two windows

    I would like to implement Drag and Drop between two windows for example in Windows I can take URL Address form browser and drag it and drop it in to any control that excepts String like TextField.
    I would like to have the same behavior with my Java Text Controls.
    What can I do to achieve this?

    There is no configuration for it. It should work.
    Can you try it in a different user account. If it works in a different account, then it is likely something in your current user account that is messed up. If it doesn't work in another user account, then it is likely something with Mail, itself. 
    You could try downloading and installing the 10.6.7 combo update. That may repair what is wrong.

  • Drag&Drop between two windows

    Hi
    I am interested to know if in the latest version of abap webdynpro it is possible to do drag&drop between two windows?
    And if it is possible to have a floating part of a window ( that I can move it around the screen )?
    Thanks
    Nitsan

    Hi
    Thank u Thomas and Chris for your helpful answers!
    Still there is something I want to be sure about, the interaction that can be done between this floating window
    and the opening window.
    Can both window stay active and communicate between them?
    Ill give an example of what I mean:
    Lets say that I have window with few tables from this window I open another window with a list. now I want to dynamically
    move an item from this list to one of the tables in the parent window or move an item from one of the tables to this list.
    Can this scenario be implemented in abap webdynpro?
    Thanks,
    Nitsan

  • Sharing one "Email account" between two Windows "user account" in a "Global Inbox"

    Context: Two "windows user accounts" on a Windows XP PC, having the same email address. The "Local folder" is placed on a "All users" directory and acounts settings specify a POP server with a retention period of 30 days.
    Problem: When User B ask for reception of messages, he received all messages already read by user B. (this probably due to separate popstate.dat).
    On a previous PC two years ago, we do not had this dupplicate reading.
    If you have a solution, could you also cover the Windows 7 case.
    Regards
    Dto75

    I strongly suggest you get the whole profile in the same folder hierarchy before you even consider moving to windows 7.
    Windows XP has Program File
    Windows 7 has Program Files and Program Files (X86) your executable goes in the x86 one.
    XP has applications data
    Windows 7 has appdata
    In windows XP Thunderbird's profile is in application data in windows 7 it is in appdata/roaming
    If you open explorer the old locations appear to be there, but they will not work to locate Thunderbird's disparate parts of it's profile
    And so the list goes on. Hence none of the locations you know will probably exist under windows 7 so if parts of the profile are pointing to locations that have changed, only grief awaits you.

  • Measuring propagatio​n delay of a signal between two measuremen​t points!

    Hello,
    I am measuring propagation of an acceleration signal (ACC) between 2 measuring points (sensors).With 51.2 [kS/s] sampling rate the resolution is 19.5 [us]. I can count delay's samples "manually", but can this be automated with sufficient certainty?
    Thanks in advance,

    golubovski,
    with that few information bits you provided Gerd,johnsold and craig already provided a lot of information
    Here are some more hints:
    Of course you can filter the signals! If you apply the same (linear) filter on both signals the phase delay will be the same, so the delay you will measure between the two signals.
    And there are filter with zero phase shift (FIR)  or you can apply a filter with phase shift , inverse the data array and apply the same filter again.. -> no phase shift
    You can increase the resolution to subsample by fitting a peak on the autocorrelation or
    Do an phase delay measurement in the frequency domain...  I just did that to measure the dispersion of sound in a titan rod ...
    BUT all of that involves a basic understanding of signal theory or to stay with your example: All parts for your (software) Ferrari are there and some hints on how to put it together are given. However without understanding what you do you will crash.
    Greetings from Germany
    Henrik
    LV since v3.1
    “ground” is a convenient fantasy
    '˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'

  • Remote desktop not allowed between two Windows 8.1 pro pcs

    PC1 client of a domain
    PC2 notebook (no domain)
    User (in remote access) is a domain administrator and also pc1 admin.Logon is not allowed from pc2 to pc1 with the following message:
    "The system administrator has restricted the types of logon (network or interactive) that you may use. For assistance, contact your system administrator or technical support."
    no problem if I use a PC with Windows 7 or XP
    The standard configurations for remote access are equal for the two pc: no network authentication is required"
    Thanks

    Hi,
    Enable the two policies below on PC1 to check how it works:
    Computer Settings\Policies\Administrative Templates\Windows Components\Remote Desktop Session Host\Security\Require use of specific security layer for remote (RDP) connections
            Set Security Layer to RDP
    2.   Computer Settings\Policies\Administrative Templates\Windows Components\Remote Desktop Session Host\Security\ Require user authentication for remote connections by using Network Level Authentication
    Set to Disabled
    Alex Zhao
    TechNet Community Support

  • Change the focus between two windows

    I have a program that uses a console window, and an appletviewer window. I want to know the code required to change the focus between each of the windows. By focus I mean which window is on top of the screen.

    These are java.awt.Frame or javax.swing.JFrame objects, right? Use their show() method. Some OS's may not allow you to steal focus. You could try:
    frame1.hide();
    frame2.hide();
    if(wantframe1ontop)
    frame2.show();
    frame1.show();
    else
    frame1.show();
    frame2.show();
    }

  • Best way of sending signals between two VIs

    Hello all,
    I have two VIs. One that generate some complicated signals (sine wave, impulse, etc.). The other one takes manually inputted voltage and pressure send them out to some hardware with a pump, and reads back the output of the pump.
    What is the best way of sending the waveforms from the signal VI to the manual control VI? I still need to be able to control the signals manually in that manual control VI.
    Thanks.
    Solved!
    Go to Solution.

    nitad54448 wrote:
    hi
    For exactly this kind of process, I am using queues, FG and (relax ppl, I know..) global variables. If you are writting a global in one Vi and reading it in another (to prevent accidental (fake)updating); globals are easy to implement. Many people hate them (I do, sometimes) but for these kind of cases I think they are well adapted.
    For FG you need a user control and a vi for each variable you want to share... Both FG and globals are "bottle in the ocean" like of information : you send some info and sometimes this info will arrive somewhere...
    If you need to be sure that the info is passed then Queues are to be used...
    N
    While you may not run into race conditions using global variables in a write once/read many approach they do not protect you from some part of your application deciding to write to them. FG at least provide some level of protecting access while globals do not. In addition, global variables can create multiple copies of your data. If your data is large, this can be problematic. I much prefered using a defined messaging scheme. The intent is very clear and you can provide safe guards. Even FGs are better. I personally would never recommend the use of global variables even though some cases MAY work out. A defined API is always a prefered approach and helps to keep the code modular and decoupled. This leads to greater reuse. Global variables tie things together and make reuse more difficult.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

  • Communication between two windows

    Hi,
    I have a form to store student's personal information. In the middle of the form I have a link named "upload image". When click this link, a new window will pop out for user to upload up to 6 files. I use JSPSmartUpload to upload image, which works fine. When close the pop up window after done uploading, the old window which contains the form need to automatically contain the links to display images uploaded so far. It's like the "attach file" when using yahoo email to attach files. When you done with the attachment, the email will show all filenames you attached so far.
    I was thinking that when close the uploading window, the window object will call a reload action target to the parent window. During the reloading, the old parent window will go to database to check the image files and create related links. But the problem is that if reloading the parent window, I think I am going to loose all informations in that form the user entered so far. So, he had to reenter all information.
    Can anyone give me some hints about how to accomoplish this task? Thanks in advance.
    jmling

    Can you give me more details? Or give me some website to check. For example, the form is as below:
    <form method=get>
    <table>
    <tr><td><input type="text" name="name" size="20"></td></tr>
    <tr>
    <td><a href="uploadForm
    onClick="popUp('<%=request.getContextPath()%>/fileUpload.jsp', 'uploadWin', '600', '450', 'yes'); return false;"><strong>upload Forms</strong></a></td></tr>
    <tr><td><input type="submit" value="continue" name="next.x"></td></tr>
    </form>
    how to use javascript to get input "name"'s value? where to store them? how to pass this value to the new window and pass it back? Sorry for this simple question. I appreciated it.
    Thanks!

  • I want to sync the data between two windows device, but I can't find my security key.

    Please send me a guide about how to setup the sync data with windows device.
    I can't find account management in sync tab.

    See these Sync KB articles: <br />
    https://support.mozilla.org/en-US/kb/how-do-i-set-up-firefox-sync<br />
    https://support.mozilla.org/en-US/kb/add-a-device-to-firefox-sync<br />
    https://support.mozilla.org/en-US/kb/find-code-to-add-device-to-firefox-sync<br />
    https://support.mozilla.org/en-US/kb/how-do-i-choose-what-types-information-sync-firefo

  • Mirrored Storage between two servers

    Hello,
    Is it possible to create redundant storage using two Windows 2012 r2 servers?  I've been looking all over and any HA options always reference having external shared storage presented to the cluster (I assume NAS/SAN).  I am also assuming that said
    posts expect that whatever tech is being used for shared storage deals with keeping that data fault tolerant (e.g., mirrored SAN) and the Windows cluster need not be aware of that happening in the background.
    Due to lack of any storage hardware in my environment I was hoping there was a way to create a redundant file share/system between two Windows 2012 r2 servers at which point I could then create an iSCSI target to present a virtual drive to an application
    server cluster.  That way if one of the "storage servers" fails it won't take down the application running on the app server.  I looked into DFS however since the app locks its files those won't replicate across.
    I hope my question wasn't too convoluted.
    Thanks for any guidance! 

    Hi Bkboudreau,
    If I am not misunderstand your question, you are finding the method for iSCSI target servers synchronize iSCSI data.
    Replication of data between sites is very important in a multi-site cluster, and is accomplished in different ways by different hardware vendors. You can choose the hardware
    storage vendor solution when you want to synchronize data between two shared storage.
    You cannot use the feature in Windows Server 2008 called Distributed File System Replication (DFS-R) as your data replication method in a multi-site cluster. DFS-R only performs
    its data replication after a file is closed. This works well for files such as documents, presentations, or spreadsheets, but it will not work for files that are held open, such as databases or virtual machines. You must choose a replication option other than
    DFS-R.
    The related KB:
    Requirements and Recommendations for a Multi-Site Failover Cluster
    http://technet.microsoft.com/zh-cn/library/dd197575(v=ws.10).aspx
    The similar thread:
    how to sync the data between the two iSCSI target server
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/067ba543-369c-4d22-9f00-1f41d7aedc00/how-to-sync-the-data-between-the-two-iscsi-target-server?forum=winserverClustering
    Hope this helps.
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Losing signal between WDS stations when Time Capsule backing up

    I have the most odd problem and I can't figure it out.
    Summary:
    I have a WDS network set up using three Apple Airport routers. They work perfectly and internet signal and signal between routers is fine. However, as soon as Time Capsule begins to backup, the wifi signal between two other routers (also within this WDS network) slows to a crawl and essentially disabling me from getting to the internet. This ONLY happens when Time Capsule's internal hard drive is backing up with Time Machine.
    *Device Details*
    I have three Apple Airport routers:
    a) Airport Extreme (the older space ship model that only runs on G or B)
    b) Airport Express (the older model that runs only on G or B)
    c) Time Capsule (the older model that runs a single G, B, or N network. No multiple networks)
    This is how the WDS network is set up:
    *dsl <==> Extreme (main) <-> Express (relay) <-> Time Capsule (remote) <-> laptop*
    dsl modem is wired to the Extreme. Everything else is connected by wifi signal
    Problem
    This WDS network setup works and I do not have problems accessing the internet until my laptop (MacBook Air) activates Time Machines and backsup on the Time Capsule. As soon as that happens, the speed rate between the Extreme and Express drop dramatically. That's right! The speed rate between the Extreme and Express drops dramatically to a rate of 1Mbps (according to Airport Utility) rendering it impossible to access the internet using this network. Meanwhile, the Time Machine backup is going well at a very fast speed. The signal rate between Express and Time Capsule is normal.
    Here is a schematic diagram of the connection that has problem (marked with XX) when the Time Capsule hard drive is running:
    *dsl <==> Extreme (main) <XX> Express (relay) <-> Time Capsule (remote) <-> laptop*
    I do not know why the speed rate between Extreme and Express would drop. Why should the hard drive of the Time Capsule be affecting the signal rate two routers down? It is not even directly connected to the connection between Extreme and Express.
    Anyone have any idea what is going on? Is this an indication that my Time Capsule is dying? Or, that somehow the hard drive when working creates serious interference such that router signal is affected? If so, it is still odd that the router signal between Time Capsule and Express is not affected.
    _*Actions Taken*_
    I have spent many hours trying to solve this problem. Actions I have tried:
    • disable wireless client access to all routers EXCEPT Time Capsule. I was thinking maybe somehow the MacBook Air was connecting to multiple routers when the backup was taking place.
    • decrease signal strength of Extreme to 50%. I was thinking maybe the signal of the Extreme was somehow getting messed up with the signal of the Time Capsule and thus affecting the connection between Extreme and Express.
    • set network to run as b/g compatible mode, and g only mode. Makes no difference. Connection between Extreme and Express goes down when Time Capsule hard drive is backing up
    • change the name of the WDS network to something different. Makes no difference
    • turn off MacBook Air wifi and directly connect it to Time Capsule by USB ethernet. When back up happens, there is apparently no interference and I can continue to use the internet. So somehow, backing using wifi from MacBook Air to Time Capsule is creating interference between the other two routers. Makes no sense, but it is what I observe.
    • oh yeah, I've also hit the Time Capsule a few times and banged the Express a couple time in hopes that a little bit of thuggish threat would straighten up these two imbeciles. No go. They won't listen
    Okay folks! IF you have gotten through this far in my message, you deserve a gold star and a membership in the Last Supper Club. Please help if you have any ideas what I should try besides throwing the Express and Extreme and replacing them with something that runs on N.
    =======================
    P.S. I should say that I've used this setup for over a year and never a problem until well, yesterday.
    Message was edited by: Conal Ho

    Here is another oddity, when my other laptop, a MacBook Pro 15" (first generation) activate Time Machine and backs up to the same Time Capsule, it DOES NOT lead to the degradation of wifi signal! I can still access the internet without problem.
    Now I'm wondering if this is something about my MacBook Air.
    Note that both machines are running 10.6.2. My 15" MBP is a first generation and so the highest wifi speed it does is G speed.

  • Better estimation of phase difference between two signals with variable frequency!

    Hello LabView Gurus, 
    Being a power engineer and having just a little knowledge of signal processing and labview, I have been pulling my hair out for the last couple of days to get a better estimation of phase difference between two signals.
    We have two analog voltage signals; 1. sine wave (50Hz ± 1Hz) and 2. a square wave with exactly half of sine wave frequency at any time.
    At the starting point of operation (and simulation/acquisition) both signals will have no phase difference. However, the square wave's frequency changes unpredictably for a just a few millisecond but then it gets synchronized with sine wave's frequency again. This means that the square wave will be phased out from its original position. The task of the labview is to find the phase difference between the two signals continuously.
    My approach to determine the phase difference is to measure the time when sine wave crosses zero amplitude and the time when the very next square wave changes amplitude from zero volts to +ve voltage (I have a 0.5volts threshold just to avoid any dramas from small line noise). The difference between these times is then divided by the time period and multiplied by 360 to get this phase difference in angles. 
    As this part is just a small block of a big project, I can only allow 5000Hz sampling rate each for both signals. I read 500 samples (which means I read data from 5 cycles of sine wave and 2.5 cycles of square wave).
    Now the problem is, as long as the frequency of sine wave stays constant at exactly 50Hz, I get a good estimation of the phase difference but when the frequency changes even a little (and it will happen in the real scenario i.e 50Hz ± 1Hz  and the square wave's frequency is dependent of sine wave's frequency), the estimation error increases.
    I have attached my labview program. From front panel, you can set the phase of square wave (between -180 and 0) and you should see the labview's calculated phase in the indicator box named 'Phase'. Then you can press 'Real Frequency' switch that would cause the frequency to change like it would in real operation.
    You can observe that the estimation error increases after you push the button. 
    All I need to do is to reduce this estimation error and make it as close to the actual phase difference as possible. Any help would be greatly appreciated.
    I am using LabView 2009 for this task.
    The application is for electric machines and the stability/performance of machines under different faults.
    Thank you for reading this far!
    Regards,
    Awais
    Attachments:
    v603.png ‏320 KB
    v603.vi ‏186 KB

    Jeff Bohrer wrote:
    Basic math gives me a bit of pause on this approach.  You are sampling at 50 times the frequency of interest so you get 50 samples per cycle.  your phase resolution is 1/50th cycle or 7.2 degrees +/- noise.  You will need to samlpe faster to reduce phase resolution or average multiple readings (at a time cost that is signifigant)
    Jeff- (Hardly Working)
    I am sampling at 100 times the sine wave's frequency and 200 times the square wave's frequency.  Increasing the sampling rate completely solves my problem. But since I am acquiring several other inputs, I cannot afford a sampling rate higher than 5kHz.
    F. Schubert wrote:
    I'm not a signal processing expert, but here my basic understanding.
    If you simulate sampling with 5kHz and a frequency of 50 Hz (and both are 'sync' by design), you always get an exact 5 periods. Any variation of your signals frequency gives you a propability to get 4 or 6 'trigger' events. That's an up or down of 20%!
    The one measure to reduce such problems is using 'window functions'. They don't fit your current approach (counting instead of a DSP algorithm), so this needs to be reworked as well.
    My approach would be to use the concept of a Locki-In amplifier. You need to phaseshift your ref-signal by 90°. Then multiply your measurement signal with the ref signal and the phase shifted ref signal. The obtained values for x/y coordinates of a complex number. Calculate the theta of the complex number (with the LV prim). Feed this in a low pass filter.
    The trick on this is, that the square wave has harmonics in it, in this you are interested in the second harmonic which is the sine wave.
    To get rid of the effect that the sync between sampling rate and ref signal frequency gives an error, you then can use the window I mentioned above (place it before the lock-in).
    For a design that really plays well, use a producer-consumer design pattern to get the calculations done in parallel with the DAQ.
    I suggest you to check on wikipedia for some of the keywords I mentioned. Go also for the external links which lead to great tutorials and AppNotes on the signal processing basics.
    Sorry, it's not a simple solution I offer and we will have quite some conversation on this forum if you follow this path. Maybe someone else knows a simpler way.
    Felix
    www.aescusoft.de
    My latest community nugget on producer/consumer design
    My current blog: A journey through uml
    An interesting view. the sine wave can indeed be looked as a second harmonic of the square wave. I will implement your idea and get back to you as soon as I get some results. But since I have very limited knowledge of signal processing, it might take me a while to get my hear around the solution you mentioned.

  • How do I share my printer between my two Windows 7 systems?

    Some users find that they have a non-networked printer that worked fine in a mixed Windows environment, but found their two Windows 7 printers (one host and one client) are not able to share the printer.
    Windows 7 handles networking differently than previous versions of Windows.
    The easiest way to get started with sharing printers between multiple Windows 7 computers is to setup a HomeGroup.  A HomeGroup is a way to authorize different Windows 7 computers to talk to each other and share resources.  Microsoft has a good article about HomeGroups that has links to various guides.
    Once the HomeGroup is setup, the next step is to setup a host for the USB printer.
    This article from Microsoft details how to enable file and printer sharing, sharing the printer, and the basic steps of adding the printer.
    The first two sections are fine as they are, but I would like to expand on adding a shared printer to the other Windows 7 computers.  
    This process tends to have the greatest success with sharing printers in Windows 7.  Most USB only printers do have a driver available in Windows.
    1.  Go to Start>Devices and Printers.
    2.  Click on Add a printer at the top.
    3.  While it is a networked printer, it is not the current network standard printer.  Select Add a local printer.
    4.  Select Create a new port with a local port for type.
    5.  Enter \\<host computer name>\<printer name> without the < > symbols.  The host computer name is the name of the computer that has the printer attached to it.  If you do not know that name, go to the host computer and go to Start>Right-click Computer>Properties.  The computer name will be listed here.  The printer's share name was selected in a previous step in the Microsoft article.
    6.  Click Ok and the printer driver screen will appear.  Click on Windows Update to ensure it is the most current list.
    7.  Select the printer model from that list.
    8.  Follow the rest of the prompts.
    At the end of these steps, the printer should be shared from the host computer to the other Windows 7 computers. 
    Some important notes about this setup:
    1.  Only printing will be functional.
    2.  The host computer must be on for printing to work.
    3.  The host computer could enter standby or suspended mode.  This will interrupt the shared printer on the other systems.
    With these steps completed, the printer should be functional on the Windows 7 computers once again.
    ↙-----------How do I give Kudos?| How do I mark a post as Solved? ----------------↓
    This question was solved.
    View Solution.

    I hope this information is helpful to some.  
    ↙-----------How do I give Kudos?| How do I mark a post as Solved? ----------------↓

Maybe you are looking for

  • Error while releasing the web service

    Hi, I am using a FM to be used as WS se37->diplay->utilities->moreutilities->create ws. In i wizard all steps were sucess except the last. I am getting an error  "error while realising web service". Also I could not see the ws in TC wsadmin. Kindly C

  • Process demand for third party direct shipment

    Hello , I need help in below given areas. in our rollout client is given statement of work like this. 1)     Demand transfer to vendors 2)     Reminder processing 3)     Process demand for third party direct shipment Please can you explain me about

  • How to use setters and getters in another program by using bean

    how to use the setters and getters methods using database connection by bean

  • Extracting, or deleting pages to save in a seperate file

    When I go to documents menu I no longer have an option to extract or delete pages to save to a seperate file. This changed when I updated my adobe to adobe reader 8.0. I am trying to figure it out but I am having no luck at all. How do I get the menu

  • FFT and Tone Measurements

    Does the Express VI, Spectral Measurements and the Extract Multiple Tone Information VI return the same data?  The express VI displays the information in dB and the Extract Multiple Tone Information VI returns the amplitude in volts.  The issue is th