Please help: how do you pass events between two panels?

hi
this is probably very simple but so far no one of you could help me. i checked the tutorials but there's nothing. i've got a panel in a panel. when a child-panel-button is clicked i want to notify the parent which then exchanges the child panel with another.
another question
if i use paint() in a swing program, most components don't get displayed. why? paint() would be a useful loop to make user events visible.
thanks

code:
class PnlParent extends JPanel implements ActionListener
add( pnlChild1Obj ) ;
add( pnlChild2Obj ) ;
public void actionPerformed( ActionEvent e )
//if button of pnlChild clicked then exchange pnlChild
// the invisible button method in PnlParent does not work
// i get a NullPointExeption, maybe i cannot reference an outer panel button
// from an inner panel
remove( pnlChild2Obj ) ;
add( pnlChild3Obj ) ;
class PnlChild1 extends JPanel implemts ActionListener
add( btn1 ) ;
add( brn2 ) ;
public void actionPerformed( ActionEvent e )
class PnlChild2 extends JPanel
add( text )
class PnlChild3 extends JPanel implemts ActionListener
add( btn3 ) ;
add( brn4 ) ;
public void actionPerformed( ActionEvent e )
}

Similar Messages

  • How Do you pass events between two Different VIs

    Hi everyone
    I have created this event driven VI....  I now want to drive the events from another VI that doesn't generate events but is static or just plain runs
    Thank
    dale

    Hi Megan
    I got your code snippet and I see how you do that.  I am new at Lab view and probably am not really getting into the overall architecture if you will.  So I have developed this event driven interface tool box that have within the events a section of code.   The Tool box is a standalone.  I want to use it  from a calling SubVI - as you have shown in your first example without making the sections within the event more Sub vi's.  Think of it as using the events within the toolbox.   The toolbox (SubVi) by itself stays within a loop until the user presses a finish button during standalone.   When the toolbox is called by another VI it does not get stuck!  It simply returns.  I am somewhat spoiled by using VB or C++ just to call the section that gets executed within the class or Sub.  Furthermore when I try to make the pieces within the events Sub Vi's I get a large number of inputs and outputs and a bunch of warnings "insane wires" - These are caused by the properties nodes needing to expand once they are placed into the sub vi.
    To further complicate things when I use your first example ... I don't register changes only static conditions when only going throught the subV i once.
    Sorry for being such a pain
    Dale Pittock
    Agilent

  • PLEASE HELP how do you make gravity around two or more points that effects a ball or so on

    hi
    i have been trying for hours to make a ball that if effected by two points of gravity a bit like http://activeden.net/item/gravity-simulator/15437 this but i can not code it and i can not find any tutorials that show you how to do it.
    hope some one can help
    thanks

    So here's some more info, Not only have i never used a mac before, I don't really know how to use one, and my girlfriend is at school pretty far away right now, shes not good with computers either. So i don't wanna have to resort to asking her to install jmf on her macbook. If i do have to do that i guess i could get her friend to help her out.
    But i'd still rather get this problem fixed. How do i incorperate jmf with my program, so it runs on all computers. I checked the native folder in SipCommunicator 1 release 2 and 3, but its only one dll file called ShellLink.dll
    I checked everywhere in both of the downloads and i couldn't find any other dlls.
    I must be downloading the wrong thing....
    I downloaded
    SIP Communicator 1.0-alpha2 release: Generic installer for all OSs
    and also
    SIP Communicator 1.0-alpha3 nightly builds: Generic installer for all OSs, Java installation required
    The reason i got the generic installer is because I have a vista, and i want to run this on a mac. I don't have or know any one living near me with a mac, so i need to be able to build it on my comp.

  • How do you use airplay between two iOS devices

    How do you use airplay between two iOS devices

    I would read http://support.apple.com/kb/ht4437?viewlocale=es_es

  • Please Help - How do you access/read an element in array of strings

    Hi,
    I want to load up some VI's into subpanels and I have created a for next loop.  Outside the loop is my files and a build array function.  How do you read the first element of the string array?
    I have been programming in Agilent VEE Pro for several years and I am only just learning LabVIEW.  It seems very different!  In VEE, you could use a formula to pass the first element of an array. eg. Array[Element No]
    TIA

    Hi,
    Well, I did try this but I get this error message:
    You have connected a scalar (non-array) data type to an array of the same data type. This type conflict may be resolved by building the scalar type into an array. Check for a tunnel on a loop that has indexing incorrectly disabled.
    The type of the source is string.
    The type of the sink is 1-D array of
    double [64-bit real (~15 digit precision)].
    Attachments:
    MyCode.vi ‏8 KB

  • Forms6i- how do i pass values between two forms

    Forms6i- passing values between forms
    I have two forms. FORM1 does a call_form to FORM2.
    How do i send values from FORM1 over to FORM2?
    I want the 2 values in FORM1 to be passed top FORM2 and displayed as a TEXT ITEM.
    But i don't know what is involved in passign vales between forms.

    Define Parameters in Form2, and pass parameters with the same name from Forms1 with the parameter list option of your call_form built-in.
    It is in the online help.

  • How do you copy songs between two shared libraries?

    I have a mac book, hubby has a pc. We have set up home sharing and can see and listen to each others songs. However he has spent the time taking adding music from our CD's to his library. I would like to copy songs from his library and place them in mine but am having no luck. I have tried looking for answers on the forums but have not been successful finding any answers. I have tried copy paste and import. I am sure I am doing something wrong but have no idea what it is. Can someone out there please help?

    iTunes has two kinds of sharing!
    *Regular sharing* allows viewing and listening, but not copying.
    *Home sharing* is the one you want; it allows copying as well. Here is the link to the support article for Home Sharing: http://support.apple.com/kb/HT3819

  • How do you share information between two iPod Touches?

    My girlfriend and I are considering iTouches to replace our old Palm Z22s. We beam a LOT of data between our Palms — grocery lists, contacts, events, notes, tasks, expenses, odometer/milage entries on cars — almost every day.
    How does one instantly transfer data between two iTouches?

    So there's no easy way to do this? Can't say I'm surprised, the way Apple has become a "my way or the highway" brand.
    It's simple: I've added 10 items to my grocery list. She's added 5 items to hers. We're at the grocery store, where I'm about to shop while she runs other errands.
    How do I get her shopping list from her iTouch to mine while standing there in front of the store?
    With our Palm Z22s, using 10-year-old technology, she can beam me her list in about 2 seconds.
    With the iPod Touch, apparently she can't send me her list at all, unless, what? She copies down each item into an email, finds free wifi, sends the email to me, I receive it, then copy the items in the email back into my copy of our shopping list app?
    REALLY?!?

  • How do you pass values between case structures?

    Hi,
    I have a simple vi where I am measuring voltage in a WHILE LOOP. The WHILE LOOP contains 2 case structures.  Under some measured voltages,  case 1 or case 2 will execute, and under some other voltages, neither case will execute, and the WHILE LOOP simply iterates again. 
    Case 1 and Case 2 both issue commands that are calculated using both the measured voltage and the PREVIOUS command value, using a very simple addition/subtraction sequence.  Case 1 and Case 2 are likely to execute many times before the voltage changes enough to pass into the "in between" range.  Each time either case executes, a new command is issued.  Each new command is a modification of the previous command by the addition/subtraction process.
    The two cases refer to an upper threshold and a lower threshold.voltage value.  There is also a voltage range in between the lower and upper threshold values where we do not issue any commands.  Commands are issued only when Case 1 (voltage<lower threshold) or Case 2 (voltage>upper threshold) is TRUE.
    In the case structures, the measured voltage is used to calculate a command value by adding or subtracting to the previously calculated command, where either Case 1 or Case 2 are TRUE.  The case structures do NOT use any of the voltage values measured in the "in between" range. 
    Suppose that Case 1 is executing and sending commands properly, and then, the voltage value changes to the in-between range and continues to the Case 2 range.  What I want is for the Case 2 to use the last command issued by Case 1 for the Addition/Subtraction.  Recall that many voltage values are likely to be measured in the "in between" range and none of these will result in issued commands.  How do I capture the last command from Case 1.  Of course, I want to go both directions.  A total of four differen sequences are possible:
    Case 1--> In between --> Case 2
    and
    Case 2 -->In between --> Case 1
    and
    Case 1 -->In between --> Case 1
    and
    Case 2 -->In between --> Case 2
    How do I capture that last command issued, and store it until either case becomes TRUE again, and then make the case use this command?  I don't think that a shift register will work because the "in between" range will change the value in the shift register, and I don't see how to implement a shift register with a Case structures.  Will the feedback function work for this?
    Thanks for your thoughts.
    Dave

    Action Engines probably are a good idea.
    I think the state machine in the attached vi should also be sufficient.
    Attachments:
    State Machine Example.vi ‏11 KB

  • How can you remove clustering between two BO XI 3.1 Servers

    Hi,
    Servers A and B have been clustered before and because we have done so many changes to each of the servers, we thought of uninstalling everything from both servers and reinstall BO XI 3.1 server on each.
    Installed BO XI 3.1 server on Server A, applied SP2 and this worked fine.
    Installed BO XI 3.1 server on Server B, applied SP2 and this worked fine too.
    We performed the installation using most of the default settings e.g. port number on both servers (nothing on setting them up as clusters).
    However, when we checked the Settings on both CMCs of our BO XI 3.1Servers, there was information under the Cluster Tab as follows and these were on both servers' CMCs:
    CMS Name: ServerA.cms (ServerA.ourdomain:6400)
    Cluster Name: @ServerB.ourdomain:6400
    Cluster Members:
    ServerA.cms (ServerA.ourdomain:6400)
    ServerB.CentralManagementServer (ServerB.ourdomain:6400)
    Question: How can we remove clustering from both servers (we do not want it in the first place and we did not think we set it up when we reinstalled BO XI 3.1 on each).
    Hope someone can help us.
    Thanks.
    Edited by: boxidhf on Apr 14, 2010 8:18 AM
    Edited by: boxidhf on Apr 14, 2010 8:19 AM
    Edited by: boxidhf on Apr 14, 2010 8:19 AM

    This is the high level procedure.
    1. STOP SIA on the server to be removed say X.
    2. Delete all the servers that belong to X from CMC.
    3. Delete the SIA on X and un-install.
    There are some key points to watch out for- you can check the admin guide..but at a high level this is the process i have followed in the past.

  • How can I pass value between two pages or fragments?

    Hi,
    I am learning ADF nowadays. Now I come across the following problem.
    There are two pages or fragments in a bounded task flow, e.g. PageA&PageB. There is an inputtext on PageA.When I press an button on PageA with an action jumpping to PageB I want pass the value of this inputtext to annother inputtext, which is shown on PageB. Moreover, the inputtext on PageB comes from a ViewObject. How can I achieve this goal? Any ideas or suggestions?
    Best wishes!
    Eleven.Xu
    Mar 27th.2009
    Edited by: Eleven.Xu on 2009-3-26 下午7:03

    RequestContext requestContext = RequestContext.getCurrentInstance();
    requestContext.getPageFlowScope().put("var_name", value);
    String value = (String)requestContext.getPageFlowScope().get("var_name");
    if you open a new window, the value will be null.

  • How do you share music between two user accounts for multimedia purposes???

    I am working with iDVD and am running into a slight snafu. My girlfriend has most of the pictures in her iPhoto account, while I have most of the music in my iTunes account. (she works on maintaining our over flowing pictures, while I handle paying for all our music... works out nice. <wink>)
    Anyways, we were both working on a new photo DVD for family using iDVD and were frustrated that we could not pull in music from my iTunes account to use with her pictures in iDVD. I am uncertain if we are doing anything wrong and just do not know how to do it, or if it is not possible. We also have a few pictures on my iPhoto account we wanted to add to the DVD, but cannot access those either from her account while in iDVD.
    Is it possible to share this data back and forth without making two copies of all of it?
    Thanks for all your help!!
    - jonathan

    Follow the steps after the section that says "If you have an earlier version of Mac OS X", Quintalis. It explains how to do it without the Fast User Switching/iTunes Sharing which is indeed limited only to playback.
    Note that when it says "publicly accessible location", it needs to be a place where everyone has read and write access. The most common such place is the Shared folder in the Users folder.

  • How do you fix iMessage between two iPhones if both aren't working?

    iMessage has gone out between my iPhone 5 and someone's iPhone 4 or 4s. We don't know how to fix it. We have tried reset things, delete things and nothing works

    Try a reset or restart of the devices.
    If iMessage still is not available, turn iMessage off and back on.  Do this on both devices.

  • How do you share music between two iTunes accounts on one computer?

    My wife and I share a Windows 7 laptop computer.  We have separate Windows logins and separate iTunes accounts.  When we had separate computers we were able to use Home Sharing to share our music but this doesn't work when you have two accounts on the same computer.
    Is there a way to share our music libraries without wiping out what is already stored in our individual iTunes music libraries?

    Click here and follow the instructions.
    (109972)

  • How to pass Parameters between two forms

    im trying to do this but i could not find any way for this.
    can any one help me how can i pass parameters between two forms
    in forms4.5. any help will be appreciated
    thanks.
    null

    Global variables can be used, but you can do what the online help
    says ...
    Parameters are passed to called forms by means of a parameter
    list. A parameter list is a named programmatic construct that is
    simply a list of parameter names (called keys) and their values.
    You can pass parameter values to forms invoked by the built-in
    subprograms CALL_FORM, OPEN_FORM, and NEW_FORM. In addition, you
    can pass parameter values to other Oracle tools with the
    RUN_PRODUCT procedure.
    A parameter you include in a parameter list can be either a text
    parameter or a data parameter. The parameter type determines how
    its value is interpreted.
    Text Parameters The value of a text parameter being passed to a
    called product is a CHAR string that can represent the following:
    n a user-defined form parameter defined in a form invoked
    by the CALL_FORM, OPEN_FORM, or NEW_FORM built-in subprograms
    n a command line or user-defined parameter for a product
    invoked with the RUN_PRODUCT built-in subprogram
    Data Parameters The value of a data parameter being passed to a
    called product is always the name of a record group defined in
    the current form. (A record group is a data structure that
    stores records derived from a query or through programmatic
    assignment.) Data parameters are used to pass data to products
    invoked with the RUN_PRODUCT built-in subprogram. You cannot
    pass data parameters to forms.
    The following table shows the structure of a parameter list that
    contains four parameters:
    Key Paramtype Value
    CITY Text_Parameter 'BOGOTA'
    CATEGORY Text_Parameter 'EXPORTS'
    MULTIPLIER Text_Parameter '.0275'
    NEW_DATA Data_Parameter 'RECORD_GROUP8'
    arun reddy (guest) wrote:
    : im trying to do this but i could not find any way for this.
    : can any one help me how can i pass parameters between two forms
    : in forms4.5. any help will be appreciated
    : thanks.
    null

Maybe you are looking for

  • Macbook pro sporadically freezes when iTunes is open

    When I open iTunes, even if I'm not playing or using it in any other way, my Macbook programs will freeze for 10 or so seconds every couple of minutes. It doesn't happen at regular intervals. I can move the mouse, but when it's hovering over programs

  • Change "document" to report title in print queue

    Post Author: mroy CA Forum: .NET When printing from Crystal Reports to a printer, in the print queue, the Document Name is "Crystal Reports - " and the report title. When printing using ReportDocument in Visual Basic .NET program to a printer, the Do

  • PLEASE HELP ME HEEEELLLPPPP

    ok - i have had my ipod since june of 2004. it is a thrid generation. the battery is fine and still is, so this is not a battery issue. here are the symptoms: - the ipod does not read when plugged in through a firewire, though it does when a usb conn

  • How to directly wire in more than one machine

    Hello all, I am probably going to buy this router. Right now I have one machine right near the cable modem so it can be directly wired in. My laptop and Imac can hook up wirelessly. I see that there is one LAN port for a machine to be directly wired

  • XI does not process any files

    Hi Masters, I have the following issue. XI does not process several files. The log provided is the following: Configured at 2007-09-05 20:32:11 UTC History: - 2007-09-05 20:32:11 UTC: Retry interval started. Length: 900.000 s - 2007-09-05 20:32:11 UT