Swing: how do I launch a child window?

How do I open a child window or frame, get the user input on this window, and return to the parent window? I know JOptionPane has some static methods that triggers message windows, but they're too simple to meet my needs.
What lines of code should I write in the parent window (JPanel/JFrame)? And what object should I create for the child window? Thank you!

JDialog d = new JDialog(f, "Enter something!", true);
// assuming f is a reference to the main JFrame
// fill with whatever GUI
d.pack();
d.show();
// will block til closed...
// read in filled data...
You can do more in JOptionPane then is suggests. If you want some complex GUI to enter different things, do the JDialog thing. If you just want one value, you can do something like this:
JPasswordField pwd = new JPasswordField();
Object[] objs = { "Enter password:", pwd };
if(JOptionPane.showConfirmDialog(this, objs, "Enter password",
          JOptionPane.OK_CANCEL_OPTION,
          JOptionPane.PLAIN_MESSAGE) == JOptionPane.CANCEL_OPTION) {
     return; // cancelled
} else {
   String pass = new String(pwd.getPassword());
   // use it...
}

Similar Messages

  • How To create a JFrame child window

    Hi guys,
    for the first time I'm trying to develop a java application with GUI using NetBeans.
    I've created three Jframe classes and i want to set two of these as child-windows on the Main class but I couldn't find how to do this.
    public class Main extends javax.swing.JFrame {
        /** Creates new form Main */
        public Main() {
            initComponents();
        /** This method is called from within the constructor to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
        // <editor-fold defaultstate="collapsed" desc=" Generated Code ">                         
        private void initComponents() {
            Vob_Butt = new javax.swing.JButton();
            MCoder_Butt = new javax.swing.JButton();
            jLabel1 = new javax.swing.JLabel();
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            setTitle("AsfConverter 0.6");
            Vob_Butt.setText("Unire pi\u00f9 file Vob");
            Vob_Butt.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    Vob_ButtActionPerformed(evt);
            MCoder_Butt.setText("Convertire file con MediaCoder");
            MCoder_Butt.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    MCoder_ButtActionPerformed(evt);
            jLabel1.setText("Cosa vuoi fare?");
            javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
            getContentPane().setLayout(layout);
            layout.setHorizontalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addGap(110, 110, 110)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(Vob_Butt, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 183, Short.MAX_VALUE)
                        .addComponent(MCoder_Butt, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGap(83, 83, 83))
                .addGroup(layout.createSequentialGroup()
                    .addContainerGap()
                    .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(263, Short.MAX_VALUE))
            layout.setVerticalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addGap(39, 39, 39)
                    .addComponent(jLabel1)
                    .addGap(14, 14, 14)
                    .addComponent(Vob_Butt)
                    .addGap(31, 31, 31)
                    .addComponent(MCoder_Butt)
                    .addContainerGap(189, Short.MAX_VALUE))
            pack();
        }// </editor-fold>                       
        private void MCoder_ButtActionPerformed(java.awt.event.ActionEvent evt) {                                           
    // TODO add your handling code here:
            MediaCoder finestraCoder=new MediaCoder();
            finestraCoder.setVisible(true);
        private void Vob_ButtActionPerformed(java.awt.event.ActionEvent evt) {                                        
    // TODO add your handling code here:
            VobUnifier finestraVob=new VobUnifier();
            finestraVob.setVisible(true);
            this.setVisible(false);
         * @param args the command line arguments
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new Main().setVisible(true);
        // Variables declaration - do not modify                    
        private javax.swing.JButton MCoder_Butt;
        private javax.swing.JButton Vob_Butt;
        private javax.swing.JLabel jLabel1;
        // End of variables declaration                  
    //****this class may be a child of the upper one
    public class VobUnifier extends javax.swing.JFrame {
        File []source;
        File dest;
        /** Creates new form VobUnifier */
        public VobUnifier() {
            source=null;
            dest=null;
            initComponents();
      private void formWindowClosed(java.awt.event.WindowEvent evt) {                                 
        Main finestraMain= new Main();
        finestraMain.setVisible(true);   
    public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new VobUnifier().setVisible(true);
    // The third class has the same constructor of this one and similar methods    I hope to have explained the problem.
    Thanks for your help!
    Edited by: Il_cimi on Nov 12, 2007 3:45 AM

    camickr wrote:
    -> Can I insert buttons, labels etc.. in a Jdialog windows like a Jframe one or there's some limitations?
    Now how long would it take to try it?
    How do you ever learn anything if you don't try it on your own?I said that I' ve already solved my problem, you suggested me to use JDialog and I just wanted to know what's the difference. I didn't try in my own just because i'm trying to solve quickly other problems.
    I will try it when i can

  • How to parse parameter from child window to parent window in JSP

    I have two JSP i.e. course1.jsp and course2.jsp. I would want to find out how I could parse the parameter/value from child window to the parent window when the child window get closed.
    What I am trying to do is actually a file upload process. The child windows will open for user to upload the file, and when close, the file name will be parse into the parent form for database update. Is this something possible at all? or is there any other better approaches.
    Thank you.
    These are the two files:
    --------course1.jsp ------------
    Attach File <p>
    <FORM name="courseForm" action="course2.jsp" method="post" enctype="multipart/form-data">
    <TABLE cellSpacing=1 cellPadding=3 border=0 WIDTH=500>
    <TR >
    <TD>
    <input type="text" NAME="f_file_name" size="30" VALUE="this value should be taken from child windows">
    get file name
    <p>
         <INPUT class="buttons" TYPE="submit" NAME="submit" VALUE="Submit">
    </TD>
    </TR>
    </TABLE>
    </FORM>
    ---- course2.jsp -------
    <%
    String filename = "this is the string needs to go back to parent windows when I click on close";
    %>
    <p>
    close

    In course2.jsp, you have to write some javascript code to reload the parent window document to reload the document with an added parameter. But, instead of doing this, you can also do simple thing; in course2.jsp, you can reference course1.jsp controls via javascript object, "parent". On closing event of course2, you can write:
    parent.courseForm.f_file_name.text = '<%=filename%>' ;
    window.close() ;
    But for this to work, you must open your course2.jsp document thru window.open() function instead of simple hyper link (as you did thru ).
    So, modify the hyperlink line like below:
    get file name
    Hope it helps.

  • How do I center a child window in the parent when it loads

    I want to open a window and have it start up centered in the parent window. What's the best way?
    Thanks in advance for the help.

    I can't make it work. I can't find a method setLocationRelativeTo() either. What class contains that method?

  • How can i launch new Brower window?

    Dear friends;
    I am able to open Browser through java code.
    Problem is which is opening with existing Browser.
    But i want to open with new Browser.
    Can you clear me?if any code is there please send to me.
    Thank You

    try {
         Runtime.getRuntime().exec("iexplore" path+ "exaple.pdf");// firefox, ie, etc...
    } catch (IOException e) {
         e.printStackTrace();
    }It is getting problem
    Caught:java.io.IOException :CreateProcess iexplore error=2
    but one more thing is open with default browser which is in that OP
    Thank you

  • How to define Side Panels for linked to Child Window Applications

    We are trying to use the NWBC Side Panel with PPM 6.0 in NWBC 3.5.  We have a Role that has a menu defined that gives the users a link to the INM_WORKCENTER_APP which displays the current user's Tasks in a table.
    When we click on a task in the table it opens the task details using the CPROJECTS_FPM application in a new window.  This new window that opens up doesn't have any of the Side Panels that we have defined on the role with the main menu links.
    We have tried to add the side panel using different application alias and at different levels in the Role, but can't get a Side Panel to show up on the child window.  We even tried to switch the window to open INPLACE in the main window and it still switches to no side panels.  The only side panels we are able to see is side panels that the user has manually added under connections and the Data Context Viewer side panels.
    Is NWBC capable of having side panels to be defined to be available for these linked to child applications that are called from a main application screen?  If so, what is the possible configurations we need to make on the role for this to work properly?
    Thanks in advance for any help!

    Wanted to close this thread with the solution that worked for us.
    We had to change the Launchpad configuration for Role CPROJECTS Instance OIF.  We changed the Application from a Web Dynpro ABAP type to Object Based Navigation.  Set the Application Parameters Business Object to PROJECT and Operation to DISPLAY.
    Then for our role defined in PFGC for our NWBC, we added a new menu item to the Web Dynpro application CPROJECTS_FPM with Configuration CPROJECTS_FPM.  Then under Object Based Navigation we set the Object Type to PROJECT and Method to DISPLAY to match what we set above in the Launchpad.  Then set the menu item to be invisible since we didn't want it to show to users.
    Now when we launch the child window it uses OBN and sees the definition in our role and utilizes the same Side Panel definitions defined for the role.

  • Click a Butoon in RowDetailsTemplate to show a Child Window

    Hi All
    I want to show a Child Window When Clicking a Button in DataGrid RowDetailsTemplate
    my xaml is as below
    <sdk:DataGrid.RowDetailsTemplate>
    <DataTemplate>
    <Button Content=" Show Child " x:Name="bPish" Click="bPish_Click"/>
    </DataTemplate>
    </sdk:DataGrid.RowDetailsTemplate>
    and in cShrp Code
    private void bPish_Click(object sender, RoutedEventArgs e)
    Child150Pish ps = new Child150Pish();
    ps.Show(); // this mehod no available
    How can I Show my Child Window
    Thanks

    Hi,
    Please try to use code below:
    ChildWindow cw = new ChildWindow();
    cw.Content = "Please Enter your name and password or click Cancel.";
    cw.Show();
    For more informaiton,please see:
    http://msdn.microsoft.com/en-us/library/system.windows.controls.childwindow(VS.95).aspx
    Best Regards,
    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.
    Click
    HERE to participate the survey.

  • How to Close Multi Child Windows : ADF Swings - Urgent

    Hi,
    I have developed a application having Login , Filter , Master , Details , and Detail Screen . In the Filter Screen If i click on button called " CLOSE CHILD WINDOW " , all the screens ( Master , Details And Summary ) to be closed .
    Can u please let me know how can i do this .
    For even Child Window to open from parent Window , i have implemented same piece of code from adfwhitepapers docs.
    private void jButton1_actionPerformed(ActionEvent e) {
    SalesOrderDetails salesOrderDetails = new SalesOrderDetails();
    salesOrderDetails.setBindingContainer(createDetailBinding(salesOrderDetails));
    DCIteratorBinding iterBinding = getPanelBinding().findIteratorBinding("SalesOrderEOVO1Iterator");
    RowSetIterator detailAccessor = iterBinding.getRowSetIterator();
    salesOrderDetails.getPanelBinding().findIteratorBinding("SalesOrderEOVO1Iterator").bindRowSetIterator(detailAccessor, false);
    salesOrderDetails.setVisible(true);
    int count = 0;
    private DCBindingContainer createDetailBinding(SalesOrderDetails salesOrderDetails)
    String detailBCName = "SalesOrderDetailsPageDef"+count;
    if (panelBinding.getBindingContext().get(detailBCName) == null)
    DCBindingContainerDef bcdef = DCBindingContainerDef.findDefObject("oracle.eaton.userinterface.pageDefs.SalesOrderDetailsPageDef");
    DCBindingContainer bc = bcdef.createBindingContainer(panelBinding.getBindingContext());
    bc.setName(detailBCName);
    panelBinding.getBindingContext().put(detailBCName, bc);
    ++count;
    return bc;
    return null;
    Regards
    Bhanu Prakash

    I have referred this link for the consecutive opening and closing screen for the linkage between the two screen like 1&2 , 2&3 , 3&4 , that was my understanding if so not can u please explain me . My requirement is to close all the child windows from the Super Parent Window , i.e. on Select of close button in Filter Screen all the screen ( Master,Detail,Summary ) should be disposed or close ,
    I have generated 4 screens :::
    1. Filter Screen
    2. Master Screen
    3. Detail Screen
    4. Summary Screen
    Can any one help me by giving there solution to sort out this issue . Its very Urgent .
    Regards
    Bhanu Prakash

  • How can i set background color of child window in jdk 1.6

    Hi friends i hv devoloped simple java app using javax.swing.JFrame in which on click button event i open new child window using JFrame to draw some image.
    i set childs background color as setBackground(Color.lightGray);
    but the problem is,child window takse its background color same as its parent window.(i.e. main window's color or desktop ).i get this problem in jdk 1.6.but it is working fine in jdk 1.5.
    how can i set background color of child window in jdk 1.6 .
    plz solve my problem.
    thanks in advanced.

    Mo,
    Call me old fassioned, but I simply refuse to demangle SMS speak.
    You've got a whole keyboard, so learn how to use it.
    Keith.

  • How to load 2 CVI panels as child window to a parent window created by VC++?

    Hello, I want to load 2 CVI panels as child window to a main window, which is created by VC++.
    the CVI panel is in a dll file(created by LabCVI). 
    the Load child panel routine is something like following,
    int __stdcall RunDLLUI (int* hParent )
    int hpanel;
    HWND hWnd;
    if ((hpanel = LoadPanelEx (0, "guidlluir.uir", PANEL, __CVIUserHInst)) < 0)
    return 0;
    // set parent
    if ( hParent != 0 )
    GetPanelAttribute (hpanel, ATTR_SYSTEM_WINDOW_HANDLE, (int *)&hWnd);
    SetParent( hWnd, (HWND)hParent);
    DisplayPanel (hpanel);
    // RunUserInterface ();
    return 1;
    The problem is, if I call  RunUserInterface (), then no window shown, it is, I think, that this routine blocks both the other panel to be created and the main window to be shown.  but if I don't call it, the 2 child windows won't response mouse event. seems no message dispatching for them.
    so how can I get what I want, thx a loooooooooooooooooooooooot.

    Hello, I want to load 2 CVI panels as child window to a main window, which is created by VC++.
    the CVI panel is in a dll file(created by LabCVI). 
    the Load child panel routine is something like following,
    int __stdcall RunDLLUI (int* hParent )
    int hpanel;
    HWND hWnd;
    if ((hpanel = LoadPanelEx (0, "guidlluir.uir", PANEL, __CVIUserHInst)) < 0)
    return 0;
    // set parent
    if ( hParent != 0 )
    GetPanelAttribute (hpanel, ATTR_SYSTEM_WINDOW_HANDLE, (int *)&hWnd);
    SetParent( hWnd, (HWND)hParent);
    DisplayPanel (hpanel);
    // RunUserInterface ();
    return 1;
    The problem is, if I call  RunUserInterface (), then no window shown, it is, I think, that this routine blocks both the other panel to be created and the main window to be shown.  but if I don't call it, the 2 child windows won't response mouse event. seems no message dispatching for them.
    so how can I get what I want, thx a loooooooooooooooooooooooot.

  • How to close child windows at logout?

    I was wondering how i can ensure that when a user loggs out,
    any related open child windows from that session are automaticaaly
    closed. The Application is written in ASP VBscript.
    Basically the user can logout two ways, either by clicking on
    the logout link or by closing the browser window. For the latter
    what i did was to create an even for the "onUnload" event of the
    browser. So when the user closes the window, it will also logg the
    user out.
    Now i also wanted to automatically close any child windows
    that the user may have opened when he either loggs out or closes
    the browser window. How can I accomplish that without prompting the
    user that the window is about to close?
    B.T.W. I use the
    window.open method to open the child windows, using either
    javascript or vbscript.

    Hi, I have no idea how to do this is JSP.
    However createing a modal window (with javascript) would mean that the user can not use the parent window untill he closes the child window. However not sure if this is what you are searching.
    Otherwise you can detect the onClose (I think) and close the window from there.
    However both the above are JavaScript and not JSP.
    rwgards,
    sim085

  • C# MDI application: how to scale child windows when main window is re-sized?

    Hi,
    I have an MDI application that have several child forms.  Users can view several forms at one time, and users also are given the options to arrange the child forms anyway they want:  cascade or tile.  What I want to achieve is that if the
    parent window is re-sized, all child forms should also be re-sized proportionally.   The code that I have only work if the child forms are tiled horizontally, AND that I only make the main window wider.  Otherwise, all forms are scaled (but not perfect),
    however, the location is not scaled; therefore, they are overlapping each other.   I greatly appreciate any help from you.  
    Size m_preSize;
    private void MainForm_ResizeBegin(object sender, EventArgs e)
    m_prevSize = this.ClientRectangle.Size;
    private void MainForm_ResizeEnd(object sender, EventArgs e)
    int iWidth = m_prevSize.Width;
    int iHeight = m_prevSize.Height;
    double dXFactor = (double)(this.ClientRectangle.Width) / (double)iWidth;
    double dYFactor = (double)(this.ClientRectangle.Height) / (double)iHeight;
    foreach (Form c in this.MdiChildren)
    if (!c.Visible)
    continue;
    if (c.WindowState == System.Windows.Forms.FormWindowState.Maximized ||
    c.WindowState == System.Windows.Forms.FormWindowState.Minimized)
    // DO not ajust on resize if a child window is at its Maximized state
    return;
    c.Scale(new SizeF((float)dXFactor, (float)dYFactor));
    Best Regards,
    Emily

    Hi Badidea,
    Once again, I did not explain my idea clearly.  I am sorry about that.  I only wanted to scale the child-windows as the parent re-sized.  And yes, if the child-windows fill up the view-able area of the parent's window, I would like them to
    also fill up the  view-able area of parent's window once again after re-size of parent window.  No scroll should be involved.
    Regards,
    Emily
    Hello,
    It depends on how you cascade or tile these forms.
    In this case, I would recommend you use this way below.
    1. Layout with splitContainers.
    2. Set each child form's toplevel to false, then add them to the panels of splitContainers.
    3. Resize these form to fit the panels.
    4. repeat #3 inside the main form's resize event.
    Here is a simple sample.
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Windows.Forms;
    namespace _150313AutoSizeMdiChiledForm
    public partial class MainForm : Form
    public MainForm()
    InitializeComponent();
    Form1 f1 = new Form1();
    Form2 f2 = new Form2();
    Form3 f3 = new Form3();
    private void MainForm_Load(object sender, EventArgs e)
    f1.TopLevel = false;
    this.splitContainer2.Panel1.Controls.Add(f1);
    f1.Size = this.splitContainer2.Panel1.ClientSize;
    f1.Show();
    f2.TopLevel = false;
    this.splitContainer2.Panel2.Controls.Add(f2);
    f2.Size = this.splitContainer2.Panel2.ClientSize;
    f2.Show();
    f3.TopLevel = false;
    this.splitContainer1.Panel2.Controls.Add(f3);
    f3.Size = this.splitContainer1.Panel2.ClientSize;
    f3.Show();
    private void MainForm_Resize(object sender, EventArgs e)
    f1.Size = this.splitContainer2.Panel1.ClientSize;
    f2.Size = this.splitContainer2.Panel2.ClientSize;
    f3.Size = this.splitContainer1.Panel2.ClientSize;
    Designer code.
    namespace _150313AutoSizeMdiChiledForm
    partial class MainForm
    /// <summary>
    /// Required designer variable.
    /// </summary>
    private System.ComponentModel.IContainer components = null;
    /// <summary>
    /// Clean up any resources being used.
    /// </summary>
    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
    protected override void Dispose(bool disposing)
    if (disposing && (components != null))
    components.Dispose();
    base.Dispose(disposing);
    #region Windows Form Designer generated code
    /// <summary>
    /// Required method for Designer support - do not modify
    /// the contents of this method with the code editor.
    /// </summary>
    private void InitializeComponent()
    this.splitContainer1 = new System.Windows.Forms.SplitContainer();
    this.splitContainer2 = new System.Windows.Forms.SplitContainer();
    ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
    this.splitContainer1.Panel1.SuspendLayout();
    this.splitContainer1.SuspendLayout();
    ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
    this.splitContainer2.SuspendLayout();
    this.SuspendLayout();
    // splitContainer1
    this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
    this.splitContainer1.Location = new System.Drawing.Point(0, 0);
    this.splitContainer1.Name = "splitContainer1";
    this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
    // splitContainer1.Panel1
    this.splitContainer1.Panel1.Controls.Add(this.splitContainer2);
    this.splitContainer1.Size = new System.Drawing.Size(607, 411);
    this.splitContainer1.SplitterDistance = 198;
    this.splitContainer1.TabIndex = 0;
    // splitContainer2
    this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
    this.splitContainer2.Location = new System.Drawing.Point(0, 0);
    this.splitContainer2.Name = "splitContainer2";
    this.splitContainer2.Size = new System.Drawing.Size(607, 198);
    this.splitContainer2.SplitterDistance = 294;
    this.splitContainer2.TabIndex = 0;
    // MainForm
    this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    this.ClientSize = new System.Drawing.Size(607, 411);
    this.Controls.Add(this.splitContainer1);
    this.Name = "MainForm";
    this.Text = "MainForm";
    this.Load += new System.EventHandler(this.MainForm_Load);
    this.Resize += new System.EventHandler(this.MainForm_Resize);
    this.splitContainer1.Panel1.ResumeLayout(false);
    ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
    this.splitContainer1.ResumeLayout(false);
    ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
    this.splitContainer2.ResumeLayout(false);
    this.ResumeLayout(false);
    #endregion
    private System.Windows.Forms.SplitContainer splitContainer1;
    private System.Windows.Forms.SplitContainer splitContainer2;
    Result.
    You could download it form http://1drv.ms/1Mwwibp.
    It is quite similar with the one for tiling, you could edit it to fit your requirements.
    Regards,
    Carl
    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.
    Click
    HERE to participate the survey.

  • Swing child window

    I want to add a new window (child window) . it should have only close button (no minimize and no maximize) and it should be a normal window (not a JInternal frame but a normal child window). How can i do that?

    JDialog

  • How to close child windows when parent window closed in jsp

    how to close child windows when parent window closed in jsp
    becoz it can't be able to recognise it's parent
    with the whole application
    plz send me some sample code of it

    Hi, I have no idea how to do this is JSP.
    However createing a modal window (with javascript) would mean that the user can not use the parent window untill he closes the child window. However not sure if this is what you are searching.
    Otherwise you can detect the onClose (I think) and close the window from there.
    However both the above are JavaScript and not JSP.
    rwgards,
    sim085

  • How to make the parent window inactive when a child window is opened

    hi everybody, i am chaitanya. i am working on a window based application. there are some action events in it. when an event occurs then a child frame is opened prompting the user to confirm for yes or no.
    the problem i got is, when the child window is opened the parent window is also active. I dont want this to happen. please help me to fix this problem.
    thank you all in advance, have a nice day.

    Use a modal JDialog, or better still given the apps. requirement for input, a JOptionPane. The JOptionPane.showInputDialog() or JOptionPane.showConfirmDialog() methods seem well suited to the task.

Maybe you are looking for

  • Video descriptions no longer showing up

    Hi Guys, I have the Apple TV 2. After the recent update that came down, I am no longer able to see the description for a video that is in my iTunes lib. I just get the cover, name and time. Has this been taken out? It's really annoying as I like the

  • I need to place the Maltese cross on a web page. IE works, Safari works, but Firefox does not. It is wingding character.

    The Maltese cross is in the winding font family. I have the following HTML on the pages: <pre><nowiki> <span class="cross" style="font-family: wingdings; vertical-align: top;">X</span></nowiki></pre> The inline element <span> tag is in a <font> tag.

  • Icon theme problem

    Hello. I have installed icewm, rox, gnome-icon-theme, and tango-icon-theme. I use rox filer to manage the icon the themes and desktop. The problem is that some icon themes display correctly (eg gtsand) and others don't (eg tamiga). In the case of tam

  • Error code 3200

    I was trying to upgrade my iphone 3gs to ios5. I kept getting a error code of 3200 (can't restore to factory settings). I followed the trouble page to try to figure out what was wrong. I checked security,usb ports,uodated software. The actual problem

  • How to call MSC2N  in QA11 transacion before saving the data of QA11

    I need to call MSC2N in the QA11 transaction because i want the Next inspection date for the particular  material, plant, and batch. but while iam in QA11 the batch is locked so it will not allow me to go to MSC2N. So to see Next inspection date i ha