Bind Child JFrame to Parent JFrame

Is there anyway of creating a JFrame that could have another JFrame attached to it? I don't so much mean an JInternalFrame, because what I need is a separate window (a properties window) that shows the user information, but doesn't register with the OS as a new window (i.e. place itself in the Windows taskbar). As far as I know, a JInternalFrame will actually be limited to the bounds of the JFrame containing it. I want mine to be a fully separate window, just bound to the parent window.
Is it possible to do this by making both windows JInternalFrames and adding them both to a JDesktopPane???
Thanks in advance for the help.

What's with all those asterisks in your code? They're very distracting and prevent us from using your code.
Anyway, the second window should be a JDialog, not a JFrame. I have to wonder why you call initComponents twice? Perhaps by doing so, the components displayed are not the ones with actionListeners added. It's hard to say not being able to run and test your code. Can you code Swing without using NetBeans code generation? If so, you should create a simpler example of this, one that we can run and test, and let us see exactly what is wrong. If you can't do this, then it would be worth your while to learn more Swing from the Sun/Oracle tutorials as this will serve you well in the long term.

Similar Messages

  • Getting the Parent JFrame or JDialog

    I am trying to get the parent JFrame or JDialog so I can change the cursor. Right now I am doing it in a stupid way by doing this:
    private void changeCursorQuestion(){
              JFrame frame=(JFrame) getParent().getParent().getParent().getParent().getParent().getParent().getParent();
              Cursor cursor=new Cursor(Cursor.HAND_CURSOR);
              frame.setCursor(cursor);
         }//end changeCursorQuestionBut is there an easier and of course better way of getting the frame or jdialog that a panel is in?

    I am trying to get the parent JFrame or JDialog so I can change the cursor. You can change the cursor of the JPanel ( in fact any Container) so why use that getParent() thing....
    Also, if you want to have quick refrence to JFrame object from JPanel, extend JPanel to make a new class and have a refrence to that JFrame/JDialog in that class, that way you can access it quickly.
    Thanks!

  • Making JFrame a parent of JDialog

    I decided to start this post again because i was going a bit of the rails before. For now, i am keeping to my original code so i can see where i am going wrong. My JFrame class is my Title class. I have other buttons in this class but the one to concentrate on at the moment is my btnLogin which brings up my Login class, which is a Jdialog. Because the action event on this button was in an inner class, i couldnt make Title the direct parent. So i have made a few changes and made the action event call another class, so that hopefully i can make Title its parent. Here is the code for Title.
    import java.awt.*;
    import java.io.*;
    import javax.imageio.ImageIO;
    import javax.swing.*;
    import java.awt.event.KeyListener;
    import java.awt.event.*;
    public class Title extends JFrame {
         public Title() {
            JPanel cp = new JPanel();
              cp.setLayout(new BorderLayout());
            Icon image = new ImageIcon("london.png");
              JLabel centerPanel1 = new JLabel(image);
            cp.add(centerPanel1, BorderLayout.CENTER);
              cp.add(createTitlePanel(), BorderLayout.NORTH);
              cp.add(createButtonPanel(), BorderLayout.SOUTH);
              setContentPane(cp);
              setTitle("Ner);
              setDefaultCloseOperation(EXIT_ON_CLOSE);
              pack();
         private JPanel createButtonPanel() {
                JButton btnRegister = new JButton("REGISTER");
                JButton btnLogin = new JButton("LOGIN");
                JButton btnExit = new JButton("Exit");
                btnRegister.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent evt) {
                        new Register();
                btnLogin.addActionListener(new LoginListener(this));
                btnExit.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent evt) {
                         cancel();
              JPanel panel = new JPanel();
              JPanel temp = new JPanel(new GridLayout(1,2, 5,5));
              temp.add(btnRegister, BorderLayout.LINE_START);
              temp.setPreferredSize(new Dimension(300, 40));
              temp.add(btnExit, BorderLayout.CENTER);
              temp.setPreferredSize(new Dimension(300, 40));
              temp.add(btnLogin, BorderLayout.LINE_END);
              temp.setPreferredSize(new Dimension(300, 40));
              panel.add(temp);
              return panel;
         private JPanel createTitlePanel()  {
              JLabel titleLabel = new JLabel("OFFICIAL RANKINGS");
              titleLabel.setFont(titleLabel.getFont().deriveFont(Font.BOLD, 48));
              titleLabel.setForeground(Color.black);
              JPanel titlePanel = new JPanel();
              titlePanel.setOpaque(false);
              titlePanel.add(titleLabel);     
              return titlePanel;
    public void cancel(){
         this.dispose();
        public static void main(String[] args) {
              SwingUtilities.invokeLater(new Runnable() {
                   public void run() {
                        new Title().setVisible(true);
    class LoginListener implements ActionListener {
             JFrame jf;
             LoginListener(JFrame jf) {
                  this.jf = jf;
             public void actionPerformed(ActionEvent evt) {
                new Login(jf);   
    {code}
    Now in my Login class, i have created a constructor which accepts a father as an arguement, so that Login can have a parent.  Here is the code to this class.
    {code}
    import java.awt.Container;
    import java.awt.GridBagConstraints;
    import java.awt.GridBagLayout;
    import java.awt.Insets;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.util.ArrayList;
    import javax.swing.JButton;
    import javax.swing.JDialog;
    import javax.swing.JLabel;
    import javax.swing.JOptionPane;
    import javax.swing.JTextField;
    import javax.swing.*;
    public class Login extends JDialog implements ActionListener
    ArrayList personsList;
    PersonDAO pDAO;
    JLabel userName, passWord;
    JTextField userName1;
    JPasswordField passWord1;
    JButton jbnClear, jbnSubmit, jbnCancel;
    String userName2, passWord2;
    Container cPane;
    public static void main(String args[]){
    new Login();
    public Login(JFrame father) {
    super(father);
    public Login()
    userName2  = "";
    passWord2   = "";
    createGUI();
    personsList = new ArrayList();
    public void createGUI(){
    cPane = getContentPane();
    setLayout(new GridBagLayout());
    //Arrange components on contentPane and set Action Listeners to each JButton
    arrangeComponents();
    setSize(210,170);
    setTitle("Login");
    setResizable(false);
    setVisible(true);
    setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
    public void arrangeComponents(){
    userName = new JLabel("Username");
    passWord = new JLabel("Password");
    userName1   = new JTextField(20);
    passWord1   = new JPasswordField(20);
    jbnClear  = new JButton("Clear");
    jbnSubmit = new JButton("Submit");
    jbnCancel = new JButton("Cancel");
    GridBagConstraints gridBagConstraintsx01 = new GridBagConstraints();
    gridBagConstraintsx01.gridx = 0;
    gridBagConstraintsx01.gridy = 0;
    gridBagConstraintsx01.insets = new Insets(5,5,5,5);
    cPane.add(userName, gridBagConstraintsx01);
    GridBagConstraints gridBagConstraintsx02 = new GridBagConstraints();
    gridBagConstraintsx02.gridx = 1;
    gridBagConstraintsx02.insets = new Insets(5,5,5,5);
    gridBagConstraintsx02.gridy = 0;
    gridBagConstraintsx02.gridwidth = 2;
    gridBagConstraintsx02.fill = GridBagConstraints.BOTH;
    cPane.add(userName1, gridBagConstraintsx02);
    GridBagConstraints gridBagConstraintsx03 = new GridBagConstraints();
    gridBagConstraintsx03.gridx = 0;
    gridBagConstraintsx03.insets = new Insets(5,5,5,5);
    gridBagConstraintsx03.gridy = 1;
    cPane.add(passWord, gridBagConstraintsx03);
    GridBagConstraints gridBagConstraintsx04 = new GridBagConstraints();
    gridBagConstraintsx04.gridx = 1;
    gridBagConstraintsx04.insets = new Insets(5,5,5,5);
    gridBagConstraintsx04.gridy = 1;
    gridBagConstraintsx04.gridwidth = 2;
    gridBagConstraintsx04.fill = GridBagConstraints.BOTH;
    cPane.add(passWord1, gridBagConstraintsx04);
    GridBagConstraints gridBagConstraintsx09 = new GridBagConstraints();
    gridBagConstraintsx09.gridx = 0;
    gridBagConstraintsx09.gridy = 4;
    gridBagConstraintsx09.insets = new Insets(5,5,5,5);
    cPane.add(jbnClear, gridBagConstraintsx09);
    GridBagConstraints gridBagConstraintsx10 = new GridBagConstraints();
    gridBagConstraintsx10.gridx = 1;
    gridBagConstraintsx10.gridy = 4;
    gridBagConstraintsx10.insets = new Insets(5,5,5,5);
    cPane.add(jbnSubmit, gridBagConstraintsx10);
    GridBagConstraints gridBagConstraintsx11 = new GridBagConstraints();
    gridBagConstraintsx11.gridx = 1;
    gridBagConstraintsx11.gridy = 5;
    gridBagConstraintsx11.insets = new Insets(5,5,5,5);
    cPane.add(jbnCancel, gridBagConstraintsx11);
    jbnClear.addActionListener(this);
    jbnSubmit.addActionListener(this);
    jbnCancel.addActionListener(this);
    public void actionPerformed (ActionEvent e){
    if (e.getSource() == jbnClear){
    clear();
    else if (e.getSource() == jbnSubmit){               
    Submit();
    else if (e.getSource() == jbnCancel){               
    cancel();
    public void clear(){
    userName1.setText("");
    passWord1.setText("");
    personsList.clear();
    public void Submit(){
    userName2=userName1.getText();
    passWord2 = new String(passWord1.getPassword());
    PersonInfo person = new PersonInfo(userName2, passWord2);
    if(userName2.equals("") || passWord2.equals("")){
    JOptionPane.showMessageDialog(null, "Please complete all fields.");
    else
    pDAO.loginPerson(person);
    public void cancel(){
    this.dispose();
    {code}
    Everything now compiles fine, and i get no runtime errors, but when i click the Login button on my Title page, nothing comes up.  So this is where i am at now.  Can anyone see my mistake?
    cheers                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    A very simple example that shows concept without showing pretty well laid-out panels:
    SimpleLoginMain.java: the main application that shows a login dialog on button press
    import java.awt.Dimension;
    import java.awt.Window;
    import java.awt.Dialog.ModalityType;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JButton;
    import javax.swing.JDialog;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JTextField;
    import javax.swing.SwingUtilities;
    public class SimpleLoginMain extends JPanel
      private JTextField nameTF = new JTextField(10);
      private JTextField passwordTF = new JTextField(10);
      public SimpleLoginMain()
        setPreferredSize(new Dimension(400, 300)); // so it's bigger than the login pane
        // make textfields in main panel non-editable, so that only the login dialog can change these
        nameTF.setEditable(false);
        passwordTF.setEditable(false);
        add(nameTF);
        add(passwordTF);
        JButton loginBtn = new JButton("Login");
        add(loginBtn);
        loginBtn.addActionListener(new LoginListener());
      private class LoginListener implements ActionListener
        public void actionPerformed(ActionEvent arg0)
          SimpleLoginDlgPane dialogPane = new SimpleLoginDlgPane(); // create the login dialog JPanel
          // get parent JFrame as Window.  Will use this when we create a JDialog on the line below.
          Window window = SwingUtilities.getWindowAncestor(SimpleLoginMain.this);
          JDialog dialog = new JDialog(window, "Login", ModalityType.APPLICATION_MODAL);
          // add the login dialog JPanel to the JDialog's content pane
          dialog.getContentPane().add(dialogPane);
          dialog.pack();
          dialog.setLocationRelativeTo(null); // center everything
          dialog.setVisible(true);  // show as modal dialog box
          // This code only is called after dialog window has been closed     
          if (dialogPane.isAccept()) // if presses the dialog's accept button
            // here get the data from the dialog panel and place in the main application
            nameTF.setText(dialogPane.getName()); 
            passwordTF.setText(dialogPane.getPassword());
      // show everything in a thread-safe way
      private static void createAndShowUI()
        JFrame frame = new JFrame("Simple Login");
        frame.getContentPane().add(new SimpleLoginMain());
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.pack();
        frame.setLocationRelativeTo(null);
        frame.setVisible(true);
      public static void main(String[] args)
        java.awt.EventQueue.invokeLater(new Runnable()
          public void run()
            createAndShowUI();
    }SimpleLoginDlgPane.java: The login JPanel that is shown in a JDialog
    import java.awt.Window;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JButton;
    import javax.swing.JPanel;
    import javax.swing.JPasswordField;
    import javax.swing.JTextField;
    import javax.swing.SwingUtilities;
    public class SimpleLoginDlgPane extends JPanel
      private static final String ACCEPT = "Accept"; // avoid silly spelling errors by using a constant
      private JTextField nameTF = new JTextField(10);
      private JPasswordField passwordPF = new JPasswordField(10);
      private boolean accept = false; // is set to true only if the acceptBtn has been pressed
      public SimpleLoginDlgPane()
        add(nameTF);
        add(passwordPF);
        JButton acceptBtn = new JButton(ACCEPT);
        add(acceptBtn);
        acceptBtn.addActionListener(new AcceptListener());
      public String getName()
        return nameTF.getText();
      public String getPassword()
        // I'm not sure of the correct/safe way to get this value
        return String.valueOf(passwordPF.getPassword());
      public boolean isAccept()
        return accept;
      private class AcceptListener implements ActionListener
        public void actionPerformed(ActionEvent e)
          if (e.getActionCommand().equals(ACCEPT))
            accept = true;
            // get the JDialog or JFrame that holds this JPanel
            Window window = SwingUtilities.getWindowAncestor(SimpleLoginDlgPane.this);
            window.dispose(); // and call dispose on it
    }Edited by: Encephalopathic on Jun 14, 2008 9:20 AM

  • Auto creation of child requests when parent request has more than one group

    Hi,
    I have created a request dataset which has a child form for AD Group. While raising a request, if I add more than one group, how to process the approval flow. Because I will be having different different approvers for different different groups. Is there any way to create child requests automatically when we submit a request with more than one group? I am using OIM 11.1.1.5.0.
    I know in OIM 11g, whenever user raises request for more than one beneficiary/target-resource then OIM breaks that request into Child Requests. But this is not happening when I add more than one group in the same resource. Do I need to write my own code for DataValidator to split parent request into child requests upon validating child form? If so, is it going to impact the existing feature which is creating child request when parent has more than one user/resource.
    Please let me know.

    No not possible OOTB in current version. Check {thread:id=2318652} for more information.
    -Bikash

  • How to access objects in the Child Form from Parent form.

    I have a requirement in which I have to first open a Child Form from a Parent Form. Then I want to access objects in the Child Form from Parent form. For example, I want to insert a record into a block present in Child Form by executing statements from a trigger present in Parent Form.
    I cannot use object groups since I cannot write code into Child Form to first create object groups into Child Form.
    I have tried to achieved it using the following (working of my testcase) :
    1) Created two new Forms TESTFORM1.fmb (parent) and TESTFORM2.fmb (child).
    2) Created a block named BLK1 manually in TESTFORM1.
    3) Created two items in BLK1:
    1.PJC1 which is a text item.
    2.OPEN which is a push button.
    4) Created a new block using data block wizard for a table EMPLOYEE_S1. Created items corresponding to all columns present in EMPLOYEE_S1 table.
    5) In WHEN-NEW-FORM-INSTANCE trigger of TESTFORM1 set the first navigation block to BLK1. In BLK1 first navigable item is PJC1.
    6) In WHEN-NEW-ITEM-INSTANCE of PJC1, code has been written to automatically execute the WHEN-BUTTON-PRESSED trigger for the "Open" button.
    7) In WHEN-BUTTON-PRESSED trigger of OPEN item, TESTFORM2 is opened using the following statement :
    open_form(‘TESTFORM2',no_activate,no_session,SHARE_LIBRARY_DATA);
    Since its NO_ACTIVATE, the code flows without giving handle to TESTFORM2.
    8) After invoking OPEN_FORM, a GO_FORM(‘TESTFORM2’) is now called to set the focus to TESTFORM2
    PROBLEM AT HAND
    ===============
    After Step 8, I notice that it passes the focus to TESTFORM2, and statements after go_form (in Parent Form trigger) doesnot executes.
    I need go_form with no_activate, similar to open_form.
    Edited by: harishgupt on Oct 12, 2008 11:32 PM

    isn't it easier to find a solution without a second form? If you have a second window, then you can navigate and code whatever you want.
    If you must use a second form, then you can handle this with WHEN-WINDOW-ACTIVATED and meta-data, which you have to store in global variables... ( I can give you hints if the one-form-solution is no option for you )

  • Fastest way to create child class from parent?

    As the subject states, what do you folks find is fastest when creating child classes directly from the parent? (esp. when the parent is in a lvlib) I thought I'd post up and ask because the fastest way I've found to get working takes a few steps.
    Any suggestions ae appreciatized!
    -pat

    Thanks for the quick response Ben!
    Yea, I apologize, in your response I realize my OP was more than vague haha (it hapens when you get used to your own way of doing things I guess huh)- I'm trying to create a child from a parent so that it has all of the methods that the parent has.
    In order to do so I currently have to open and close LV a few times during my current process so that vi's in memory dont get mixed up- Currently I save a copy of the parent class in a sub dir of where it is saved, close out of LV, open the new 'copy of parent.lvclass', save as>>rename 'child class.lvclass', close LV, and open up the project to 'add file', then right click>>properties>>inheritance.
    Is this the only way to do this?
    Thanks again!
    -pat
    p.s. I'm tempted to steal your cell phone sig, hope you dont mind haha good stuff!

  • Child .swf controlling parent timeline

    Hello Captivate Heroes,
    I've searched around, and can't seem to find any solid info on an issue my team is having. I'm a bit of a noob when it comes to Javascript, so I apologize if this question is too basic for this forum.
    Is it possible for an embedded .swf (created in Captivate) to control the main timeline in a parent .swf? Consider the example below:
    1) This window is an embedded .swf (another captivate file, which I’ll refer to as the “child”) that has an interactive walkthrough. It loads and begins playing immediately. I want users to complete this module and all interactions in it before continuing to the next slide in the “parent” file. Essentially, I want either the child or the parent timeline to play, but never both at the same time.
    2) This is our normal continue button, and I don’t want it appearing until 1 has been completed.
    My solution was to add a javascript call on the first slide of the child file that tells the parent file to pause its timeline (something like _root.rdcmdPause=1;). Then, do the opposite on the last child slide ( _root.rdcmdResume=1;). In this way, the parent slide would essentially pause on its first frame (which doesn’t have an active continue button) while the child animation continues to play. However, this isn’t working. It’s been a really long time since I’ve scripted, so I’m very rusty. Is that the proper way to manipulate parent variables in a child file? Do you have any other ideas on how to accomplish this task?
    I have a backup solution -- providing a "password" at the end of the child animation, which users can use to unlock the continue button. I'd rather use a more graceful solution
    Thank you in advance,
    Jamie

    Hi Jamie,
    I don't think JavaScript is going to help you here.  You need to be doing this in ActionScript 3. 
    For the non-scripting part, you can control the Captivate movie using system variables.  To pause the main slide, you could assign rdcmdPause=1 on the Slide Entry action.  You may want to adjust the slide transition to none so that it won't look faded out when it pauses the movie.  You can also show/hide items on the slide using the timeline, but it sounds like you won't really know when the Learner will be done with the interactive child .swf. 
    From what you described, it sounds like the Child .swf (#1) needs to communicate with other objects on the slide... mainly the continue button (#2).  In order to do that you'll most likely need to make the child .swf #1 into a widget so that it can communicate with the main movie and other objects on the slide.  I would suggest 3 possibilities:
    1.  Learn to use a widget framework such as Widget Factory or CpGears to make this possible
    2.  Take a look at the Infosemantics Event Handler Widget.  Not sure if it will meet all your needs, but it's worth a look.
    3.  Hire a Captivate Widget Developer to make this possible... and yes I am a Widget Developer (shameless plug )
    Hope that helps,
    Jim Leichliter

  • How To Display  attributes of Child Node and Parent Node in same view

    Suppose I have two view Carview and CarDetail View...IN Component context I have Parent Node Called Cars and It have its attribute as Price,Warranty,Year and also One Child Node Called as Brand Name Whose attribute are PrimaryBrand and SecondaryBrand..Now If I do Mapping of My First View i.e CarView with Child node of BrandName..and then I Have To Show Whole Detail of Car in CarDetailView.......How Can I Achieve it..

    Hi Vinay,
    You can map the child node and even the paren tnode to the same view if u want to display in the same window..
    If not if ur requirment is to dispaly in the sme view but should not map the child and parent to the Same view then you can take another new view.. and insert 2 view containers and then add the Child view and parent view in that view containers and then Diaplay the newly created view.
    Regards,
    Raju Bonagiri

  • Calling a function in child window from parent window

    Hi,
    How can I call a method in child window from parent window in adobe air using javascript. In the following example I need to call mytest() function in
    child.html from parent.html file.
    Thanks,
    ASM
    //parent.html
    <HTML><HEAD>
    <script>
    var initOptions = new air.NativeWindowInitOptions();
    initOptions.type = air.NativeWindowType.NORMAL;
    initOptions.systemChrome = air.NativeWindowSystemChrome.STANDARD;
    var bounds = new air.Rectangle(300, 300, 600, 500);
    var html2 = air.HTMLLoader.createRootWindow(false, initOptions, false, bounds);
    var urlReq2 = new air.URLRequest("child.html");
    html2.load(urlReq2);
    html2.stage.nativeWindow.activate();
    html2.window.mytest();       //NOT WORKING
    </script>
    </HEAD><body></body></HTML> 
    // child.html
    <HTML><HEAD>
    <script>
    function mytest()
      air.trace("in child window");
    </script>
    </HEAD> <body></body></HTML>

    I suspect your problem is that the child window hasn't been created by the time you call the function in the parent.Loading the content is an asynchronous processes -- AIR doesn't stop executing your code until the window has finished loading child.html. So, you will need to add an eventlistener to html2 and call the function from there:
    html2.addEventListener( "complete", onChildLoaded );
    function onChildLoaded( event )
         html2.window.mytest();

  • How to create child part from Parent Item - BLOW UP Master - Automatically

    Hi to All,
    Have any one defined this process?
    To create child part from Parent Item - BLOW UP Master - Automatically ie. we receive FG from customer which we need to blow up to its child part. In that case, FG should be consumed & child parts should be generated in stock.
    We tried with recursive, but the stock of FG was again generating with recursive.
    Ex. FG after receiving from customer in stock 1
    Child parts (with offtake 1) X1, X2, X3 in stock zero.
    After processing, FG stock should be zero & X1, X2, X3 = 1.
    Regards
    Nitin

    Create a BOM for one of the "child" parts that has the "FG from customer" as a component and all the other child parts are negative quantity components (by products).
    To make it simple have all the components backflushed and auto goods receipt the child in the BOM header.  Create a production order, then process the confirmation (this will auto goods receipt the 1st child, consume by backflush the "FG from customer" and put the other child parts into stock as by products.
    You will need to get your material prices correct first so that there is minimal variance in the production order.

  • Problem in Passing the value from child window to Parent window.

    Hi Frenz,
    I have a requirement like this. i have to pass a value from child window to parent window to one test field. That text field is not a normal text field.
    It was created like the following as SQL query.
    select
    ''LNo,
    apex_item.text(25,'',0,15,
    'style="width:100px;" onblur="javascript:showUpsell(this.value);" onkeypress="javascript:validateKeyPress(event,this.value,this.id);" onkeyup="javascript:this.value=this.value.toUpperCase();" id="P37_ITEMNO"') ItemNo
    Now i want to pass a value to the Item no from child window.
    i wrote the java script like this,
    opener.document.forms[0].f25.value="100";
    It was not working..Any suggestions for that..
    Thanks in advance

    Dear Baaju,
    How do you redirect your control from Child to Parent window.
    If you use a button to do this, then you can set this value in the branching of page.
    Rana

  • How to pass a data from child window to parent window

    Hi,
    I have a jsp page with two hidden fields and a button, On clicking the button a popup will come out. There are two combobox in the popup and a search button. After putting a value in the comboboxes,if I click the search button, I need the datas of the combobox to pass to the parent's hidden fields then I need to do a data base search with that values of hidden fields and display the result in the parent page.
    I could I solve this problem, Please help, Its urgent.
    Thanks and Regards
    Rajib Sharma

    I think that you can use the JavaScipt as follow to pass a data from child window to parent window
    <HEAD>
    <script>
    function passData(){
    opener.form1.test1.value=form2.test2.value; //pass the value of test2 to the parent's test1
    window.close();
    </script>
    </HEAD>
    <BODY>
    <form name=form2>
    <input name=test2 type=text>
    <input type=button onclick="passData()" value=CLOSE>
    </form>
    </BODY>

  • Problem: Passing the business data from Child DC to Parent DC

    HI Dear All,
    I    developed two DC,s Parent and Child DC,i am able to pass the data from Parent DC to CHild DC,when i am trying to pass the data from Child DC to Parent DC i am unable to map the context attributes. Is it possible to pass the data from Child DC to Parent DC.
    Thanks in advance,

    What I wrote earlier:
    Yes you can acheive it by doing a flip. ie, in this case the present Parent DC will become Child DC and present Child DC will become Parent DC. Now you can share the context atrributes in reverse way (ie, you can access the context attributes of current Parent DC in current Child DC).
    Sorry Parameshwari. As Anand suggested, It will give an error called Cycle in component usage definitions, if you are doing the procedure what I suggested.
    In that case only you can do only one thing , you should maintain the requried context attribute in child DC and you can use it in parent DC.
    Child DC using Parent DC's context attribute is not possible.
    Regards,
    Jithin

  • Please help - JFrame, menu, another JFrame, setBackground

    I am trying to make a simple program that draws a JFrame with a menu. The menu has one item, which when selected draws another JFrame. That JFrame has a button, which when pressed changes the background color. Many hours have gone into this, despite the fact that I made a similar program a few weeks ago.
    The compiler complains about the method getContentPane, when I remove that, it runs and draws the first window, but the menu item does not make the second window. Also, the setDefaultCloseOperation confuses the compiler as well.
    Please help.
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class MenuAction2
    public static void main(String[] args) 
         MainWindow window = new MainWindow("Menu action example");
      //window.setDefaultCloseOperation.(JFrame.EXIT_ON_CLOSE);
         window.setVisible(true);      
    class MainWindow extends JFrame
         MainWindow(String title)
         super(title);
         getContentPane.setLayout(new BorderLayout());
         Toolkit theKit = getToolkit();          
         Dimension wndSize = theKit.getScreenSize();  
         setBounds(0, 0,wndSize.width, wndSize.height);
         setJMenuBar(menuBar);
         fileMenu = new JMenu("File");
         connectItem = new JMenuItem();
         connectItem = fileMenu.add("Connect...");
         connectItem.addActionListener(menuHandler = new Handler());
         menuBar.add(fileMenu);
         getContentPane.add(toolBar, BorderLayout.NORTH);  
    class Handler implements ActionListener
         public void actionPerformed(ActionEvent e)
          win = new ConnectWindow("Connect to Database");
          getContentPane().add(win, BorderLayout.NORTH);
          setVisible(true);
      private JMenu fileMenu;
      private JMenuItem connectItem;
      private JMenuBar menuBar = new JMenuBar(); 
      private JToolBar toolBar = new JToolBar();
      private Handler menuHandler;
      private ConnectWindow win;
    class ConnectWindow extends JFrame
         ConnectWindow(String title)
              super(title);
              setSize(200,200);
              setLayout(new BorderLayout());
              JButton connectB = new JButton("Connect");
              connectB.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent e)
                        setBackground(Color.red);
              add(connectB,BorderLayout.SOUTH);
              setVisible(true);
    }

    getContentPane is a method so you should use it that way:
    getContentPane().setLayout(new BorderLayout());
    getContentPane.add(new Button("Ok"));

  • JFrame calling a JFrame....

    Hello,
    I was trying to create a JFrame which has a BorderLayout() and there is a button set at the SOUTH of the layout of this JFrame........
    Now when I click on this button..... this event would create another JFrame which also has a BorderLayout() and a button located at its SOUTH......
    Now the problem is that when I click on the button of the first JFrame, it creates another JFrame as expected but it does not create the button at the SOUTH of this new JFrame...... How do I overcome this problem......
    The code is given below..........
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class TT extends JFrame implements ActionListener
         JButton but;
         public TT()
              setLayout(new BorderLayout());
              but=new JButton();                    
              but.addActionListener(this);
              add(but,BorderLayout.SOUTH);
         public void actionPerformed(ActionEvent ae)
              JFrame jj=new JFrame();          
              JButton jb=new JButton();
              jj.setLayout(new BorderLayout());
              jj.setSize(100,100);
              jj.setLocation(300,300);
              jj.setVisible(true);
              add(jb,BorderLayout.SOUTH);
         public static void main(String args[])
              TT obj=new TT();
              obj.setSize(400,400);
              obj.setLocation(200,200);
              obj.setVisible(true);
    }It would be highly appreciated if anybody who knows the answer would take the PAIN of answering this question....... Thank you in advance.......

    Hai,
    Execute this modified code. It's executing perfectly. U better assign some text to the button.
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class TT extends JFrame implements ActionListener
         JButton but;
         public TT()
              getContentPane().setLayout(new BorderLayout());
              but=new JButton();                    
              but.addActionListener(this);
              getContentPane().add(but,BorderLayout.SOUTH);
         public void actionPerformed(ActionEvent ae)
              JFrame jj=new JFrame();          
              JButton jb=new JButton();
              jj.getContentPane().setLayout(new BorderLayout());
              jj.setSize(100,100);
              jj.setLocation(300,300);
              jj.setVisible(true);
              jj.getContentPane().add(jb,BorderLayout.SOUTH);
         public static void main(String args[])
              TT obj=new TT();
              obj.setSize(400,400);
              obj.setLocation(200,200);
              obj.setVisible(true);
    }rgds,
    rdRose

Maybe you are looking for

  • PO Multilevel Release - Value Decreased

    Dear Gurus, I'm not familiar with PO release procedure. We have a scenario: Release is based on the price $5000 - $20000 release by FI >$20000 release by FI, then release by MG How to set it? Currently we create 2 strategy: FI  consist of FI MG consi

  • Itext and CFMX7

    We developed a cfc in order to use itext and generate pdf forms on the fly on a CF6.1. We have now setup a new server with CFMX7 and promoted our applications on CF7.0 The cfc no longer seems to work under CF7. Are there any known issues with regard

  • RDIMM or UDIMM?

    Dear Techies, We are trying to upgrade our cluster Hyper-V server to a second processor and more memory. But we can't figure out what kind of DIMMs it is using. Is there anyway to check? Our configuration now: HP Proliant DL360 G7 (1<sup>e</sup> HYPE

  • OutOfMemoryError with tomcat

    I am using Tomcat 4.0, JDK 1.4.0, Java Web Services Developer Pack 1.0 When I run a servlet within Tomcat, I get a java.lang.OutOfMemoryError I have tried to increase the memory with -Xmx3500m in the file catalina.sh which is called by startup.sh but

  • Help me reduce 4.4GB of other data

    How do i remove the "other" storage on my phone without removing important data, such as Contacts and Photos?