Can't create child dialog

Hello,
maybe this is a silly beginners issue but anyway - I'm struggling for ours to create a new JDialog in my parent JFrame class. SIMPLY NO WINDOW APPEARS!
Perhaps I just overlooked something
Here's the way I call it in the parent JFrame class:
TestDia dia = new TestDia(frame, "title", false);
in the Dialog class, everything looks alright
public class TestDia extends JDialog {
JPanel panel1 = new JPanel();
BorderLayout borderLayout1 = new BorderLayout();
JTextArea jTextArea1 = new JTextArea();
public TestDia(Frame frame, String title, boolean modal) {
super(frame, title, modal);
try {
jbInit();
pack();
catch(Exception ex) {
ex.printStackTrace();
public TestDia() {
this(null, "", false);
private void jbInit() throws Exception {
panel1.setLayout(borderLayout1);
jTextArea1.setText("jTextArea1");
this.setModal(true);
this.addComponentListener(new TestDia_this_componentAdapter(this));
getContentPane().add(panel1);
panel1.add(jTextArea1, BorderLayout.CENTER);
Any help is highly appreciated
Bruno

Looks like you didn't call showDialog -- hence nothing is shown. Try this:
TestDia dia = new TestDia(frame, "title", false);
dia.showDialog();
;o)
V.V.

Similar Messages

  • Can I create child windows in the Sequence Editor?

    Good morning,
    I'm working on an ActiveX class that manipulates some MFC dialogs and other useful things. I was wondering if anyone has been successful creating windows that have the sequence editor as a parent.
    I tried calling the following code with the ActiveX Adapter, and I pass it a copy of Engine.AppMainHwnd:
    long CCmdTargetTSDebugWindow:howDebugWindow(long parent)
    // TODO: Add your dispatch handler code here
    dialog = new CDialogTSDebugWindow();
    dialog->Create(IDD_DIALOG_TSDEBUGWINDOW, CWnd::FromHandle((HWND)parent));
    dialog->ShowWindow(SW_SHOW);
    return 0;
    This works for about 20 seconds then TestStand crashes. If anyone knows of a legal way to create a child window, please let
    me know!
    Thanks,
    Chris Norris
    Carrier Access Corporation
    [email protected]
    303.218.5826

    Hi,
    Maybe this example will help.
    http://zone.ni.com/devzone/explprog.nsf/webmain/0284C64CE766E18F862567AF004F06F8?opendocument
    Regards
    Ray Farmer
    Regards
    Ray Farmer

  • How can i create a dialog like JOptionPane functionality

    I want to show a dialog to the user by calling a method.
    1. showWindow() method will create an object of a Dialog.
    2. Dialog will return an Integer Data.
    3. this Integer data is the return type of showWindow() method.
    How can I do that?
    For Example,
    public int showWindow(){
            int iSelectedOption = JOptionPane.showConfirmDialog(null,"Do you want to save?");
            return iSelectedOption;
    }Expected:
    public int showWindow(){
            GeneralDialog dialog = new GeneralDialog();
            int iSelectedOption = dialog.selectedValue();
            return iSelectedOption;
    }

    thanks for your help,
    i did a small demo, just chenk and tell me what did is right?
    import java.awt.BorderLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JButton;
    import javax.swing.JComponent;
    import javax.swing.JDialog;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JTextField;
    public class SimulateOptionPane extends JFrame implements ActionListener
        JButton                 btn    = new JButton("YES");
        JButton                 btn1   = new JButton("NO");
        public static final int YES    = 1;
        public static final int NO     = 2;
        private int             result = 0;
        public SimulateOptionPane()
            JPanel jp = new JPanel();
            jp.add(new JTextField(10));
            JPanel jp1 = new JPanel();
            btn.addActionListener(this);
            btn1.addActionListener(this);
            jp1.add(btn);
            jp1.add(btn1);
            int i = getResult(this, jp, jp1);
            System.out.println("------->" + i);
        public int getResult(JFrame parent, JPanel jp, JPanel jp1)
            JComponent panel = new JPanel(new BorderLayout());
            panel.add(jp, BorderLayout.CENTER);
            panel.add(jp1, BorderLayout.PAGE_END);
            JDialog d = new JDialog(parent, true);
            d.add(panel);
            d.pack();
            d.setVisible(true);       
            return this.result;
        public static void main(String[] args)
            new SimulateOptionPane();
        public void actionPerformed(ActionEvent e)
            if (e.getSource() == btn)
                result = YES;
                dispose();
            else if (e.getSource() == btn1)
                result = NO;
                dispose();
    }thnaks
    daya

  • Creating Child Boxes under a Checkbox

    Hi All,
    How can I create Child Check Boxes under Check Box??
    I need Something like this
    Technology
         Java
         VC++
         Perl
         PHP
    Employee
         System Analyst
         Programmer
         DeveloperUser has provision to slect all or some of the child items.
    But I don't find any tags or components for this in JSF
    Please help me
    Thanks
    Sudhakar

    No Sharath,
    Basically I am looking for the model something like this
    http://www.geocities.com/sudhakar_koundinya/service.gif
    Parent services and child services are dynamic. so using checkboxList component, I can't achieve this
    BTW,
    How to access no JSF request parameters in JSF beans or vice versa??
    Thanks
    Sudhakar

  • Creating AWT child dialog within a parent hangs in 1.7 but works with 1.6

    Hi,
    We are making use of Java AWT packages. In which we are creating an child dialog within a parent window and it hangs, meaning none of the buttons on the child window works, even the close is not happening (parent, child and console all hangs, need to kill the applet from the task manager). No error/exception is seen in the Console. No deadlocks noticed in the thread dumps.
    This is seen only with JRE1.7 (update 10,11,13,15) version. But the same code is working fine with JRE 1.6 version.
    We also have same codebase of next release, where the code is changed to Swings and that seems to work with JRE1.7.
    Can somebody suggest me what might be causing it to fail with JRE_1.7 at the earliest as this a critical issue.
    Thanks in advance!

    We have a tuxedo service which needs to communicate with a POS device by socket. The parent process provides the tuxedo service. The child process provides the connection management for the device. Unnamed pipe is used for communication between the parent and the child. In the child process, there is no code related to tuxedo. The benefit of that design is the tuxedo server does not need to wait for connection from the device when boots up, and the tuxedo service does not need to wait for connection from the device when the service is called.
    The tuxedo server was developed 10 years ago, and worked fine till we upgraded tuxedo from 10 to 12 recently. That means it worked for 10 years, and it worked in tuxedo 6.5, tuxedo 10. But in tuxedo 12, tmboot does not return for this tuxedo server. We have to press CTRL-C and yes to cancel. After cancel, the tuxedo service seems working fine.

  • HT5622 How can I create an Apple ID for my child without linking it to a credit card?

    How can I create an Apple ID for my child without linking it to a credit card?

    Hi Kappy..
    that did use to be the case but ios 8 you can create a child's Apple ID which will stay linked to the main Apple ID until they are 13 when they can if you wish take over the Apple ID themselves.
    I Have the same question regarding creating an Apple ID for my son but it insists I have to add a credit card to prove I'm an adult.
    thing is I don't have another card to add to my Apple ID I have been using the same card for all my family's Apple purchases i just update my details when I get issued a new one.
    Any ideas or suggestions greatly accepted.
    cheers

  • Can't create Exchange users in a new child domain

    Hi,
    i have an Exchange 2010 SP3 ( 1 CAS/Hub + 1 mailbox) server running in a parent domain. Few days ago i've created a new child domain, but i can't create mailbox for users coming from this new child domain.
    The error message says that i don't have enough rights to do this operation (can't copy the error, translation from frecnh will be a disaster :p )
    That's what i get :
    Réponse d'Active Directory : 00002098: SecErr: DSID-03150BB9, problem 4003 (INSUFF_ACCESS_RIGHTS), data 0
    I'm doing this with my parent domain administrator.
    I've read that the exchange infra had to be prepared for all domains with command
    setup.com /PrepareAllDomains
    is it possible with an existing exchange?
    Thanks for your replies

    Yes, you need to prepare any domain that will have mail-enabled accounts in it.
    You can run this for a specific domain:
    setup /PrepareDomain:<FQDN of domain you want to prepare> to prepare a specific domain.
    Its safe to run this in an existing Exchange org.
    Twitter!: Please Note: My Posts are provided “AS IS” without warranty of any kind, either expressed or implied.

  • How can I create a my own dialog in awt or swings

    How can I create a my own dialog in awt or swings instead of JDialog,Joption.
    if possible some example.
    Thanks in advance
    bhaskar

    hi,
    just use the building blocks of of GUI components and their methods. For examlpe u want to write a Font Dialog box,
    use Frame with lists , thers is classes by which u can pick the all fonts installes on ur system. Do appropriate programming to event handlers . On last in event handler of 'OK' button get the selected item from list and assign to wht u want thats all...........

  • Can i create ADM Modeless dialog using Photoshop CS5 SDK

    Hi,
    I am developing a photoshop plugin using CS3 SDK. I am using ADM to create dialogs. Developing ADM Modeless dialog is not possible in CS3 SDK.
    Can any one please tell me whether it is possible in CS5 SDK to create Modeless dialog. ( So that user of my plugin will be free to use photoshop even after invocation of DialogBox. )
    If Modeless dialogs are not possible in photoshop using ADM,..... Is ther any other way to create modeless dialogs in photoshop ??
    Regards,
    Prafulla Vedante

    ADM Modeless dialog is not supported in Photoshop in any version.
    Your only option to make a panel / palette in Photoshop is to use the CS SDK (CS5) or the "Photoshop Panel Developer's Guide" ( CS4 or CS5 ).
    http://www.adobe.com/devnet/photoshop.html
    http://blogs.adobe.com/cssdk/tag/cs-sdk

  • Can't find "Create Slideshow" dialog box.

    I have Premiere Elements 7, and am trying to create a slideshow.  The Help page refers to a "Create Slideshow" dialog box, but I don't see that anywhere.  I've looked through every menu, every icon, and tried right clicking on the photos that were dragged down to the timeline, but no slideshow option.
    I've done slideshows manually using PE7 before, but it's a big pain having to manually reset the duration of each slide, rather than changing the default somehow.
    Thanks!
    Bennett

    There are actually four different ways to build slideshows in Premiere Elements, and I show you how to do each in my books.
    But I think you're referring to the slideshow creator on the Project panel. To use it, select several stills or clips in the Project panel (by selecting as you hold down the Ctrl or Shift key) and right-click. This will open the panel I think you're looking for.

  • How can I create a link from a CHM file to a webhelp file?

    How can I create a link from a CHM file to a webhelp file?
    The CHM output (accreditation.chm) is stored in a parent directory, and the webhelp output (index.htm) is stored in a child directory.

    Open the usual Link dialog and enter the relative path from where the CHM will be installed to where the webhelp will be installed.
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • Can we create our own loops? Basic question.

    Hi,
    Can we create our own loops in Logic Pro. I see in all the tutorials. They are either taking input from external instruments OR use existing apple loops.
    I have tried FL studio demo to create our own loops. But there is no trial version for Logic Pro. Need your inputs before I purchase it.
    Thank you.
    Anji

    Yes you can!
    It is as simple as selecting a Region (optional trimming recommended) and choose the Export command.
    A Dialog window opens up that lets you enter the metadata
    Apple had its separate "Apple Loop Utility" app (now only available in the developer package) that allowed you to create loops in a standalone app. The built-in loop capability in Logic uses part of that engine.
    Hope that helps
    Edgar Rothermich
    http://DingDingMusic.com/Manuals/
    'I may receive some form of compensation, financial or otherwise, from my recommendation or link.'

  • How can I create UI components dynamically based on the result of WebService/HttpService call?

    I would like to create child components of the component
    based on a XML which is retrieved by WebService/HttpService call.
    createChildren() is the one to be used to create components
    dynamically. But if I use createChildren() and call a
    WS/HttpService request in createChildren method, I can not get the
    result of WS/HttpService request in createChildren().
    It seems that the result event is processed later after
    createChildren() is completed.
    How can I implement my requirement?
    I would appreciate any pointer or suggestion.
    Best regards
    Masa

    1) Use a List, with a custom itemRenderer
    2) Use a Repeater (Probably easiest)
    3) use Actionscript to addChild() components.
    Tracy

  • How can I create an Excel file?

    Hi,
    How can I create an Excel file using Forms 6i.
    What I'm doing is to create a file using TEXT_IO package an name it .XLS. If a read it double-clicking over the file, it opens Ok but If I open directly from Excel it opens the Convert dialog.
    I need to create an excel file as it was made from within Excel.
    Thank in advance,
    Benjamin

    When you are talking about subfiles, are you talking like Package contents of an application?
    Terminal application in Applications -> Utilities can give a command line grasp of all your files using the du command.
    Type
    man du
    when entering the terminal, followed by the enter key.
    Note, by default the terminal opens at the Home folder.   To navigate outside the Home folder enter "/Volumes/name of mounted drive/folder/subfolder" as your path.  If there are spaces in the name, putting quotes around the whole path can help.    If you end your du command with a > name.txt a text file with the name name.txt will be plugged into your Home directory.  That you can open with Excel and parse by /es thus giving you everything in Excel.

  • How can I detect a dialog and respond?

    I'm having trouble doing something that's probably not that hard. I'm trying to "Print to PDF" a bunch of old AppleWorks documents. When you open a document created in AppleWorks v6 it opens right up, but when you open a document created in AppleWorks 5 you get a dialog box that says, "This document was created by a previous version of AppleWorks. A copy will be opened and "[v6.0]" will be added to the filename."
    Right now I open the file and then:
    tell application "AppleWorks 6"
            activate
            repeat while not (exists front document)
                    delay .2
            end repeat
    end tell
    When the dialog box pops up, there's no front document so the whole thing freezes until you hit OK. How can I detect this dialog box and dismiss it?
    Thanks
    PS
    When the box is open I ran this and got this result:
    /usr/bin/osascript -e 'tell application "System Events" to get properties of windows of application process "AppleWorks 6"'
    minimum value:missing value, orientation:missing value, position:436, 153, class:window, role description:dialog, accessibility description:missing value, focused:missing value, title:missing value, size:412, 123, value:missing value, help:missing value, enabled:missing value, maximum value:missing value, role:AXWindow, entire contents:, subrole:AXDialog, selected:missing value, name:missing value, description:dialog, minimum value:missing value, orientation:missing value, position:8, 76, class:window, role description:floating window, accessibility description:missing value, focused:missing value, title:Starting Points, size:631, 189, value:missing value, help:missing value, enabled:missing value, maximum value:missing value, role:AXWindow, entire contents:, subrole:AXFloatingWindow, selected:missing value, name:Starting Points, description:floating window, minimum value:missing value, orientation:missing value, position:4, 22, class:window, role description:floating window, accessibility description:missing value, focused:missing value, title:Button Bar, size:612, 51, value:missing value, help:missing value, enabled:missing value, maximum value:missing value, role:AXWindow, entire contents:, subrole:AXFloatingWindow, selected:missing value, name:Button Bar, description:floating window

    Hi,
    The simplest would be to set the application preferences in the script.
    Like this :
    -- *** set prefs ****
    tell application "AppleWorks 6"
          activate
          set oldPrefs to its preferences
          copy oldPrefs to tPrefs
          tell tPrefs
                set old version warning to false --doesn't show the old version warning alert  
                set converted file suffix to true -- append “[v6.0]” to documents converted from older formats
                set locked file warning to false
                set paint reduction warning to false
          end tell
          set preferences to tPrefs
    end tell
    -- *** end set prefs ****
    --**** your script, example ***
    set tfiles to choose file with multiple selections allowed
    tell application "AppleWorks 6"
          repeat with i in tfiles
                open i
                tell front document
                      -- do something
                end tell
          end repeat
    end tell
    --**** end  your script ***
    -- *** reset prefs ****
    tell application "AppleWorks 6" to set preferences to oldPrefs

Maybe you are looking for

  • Can we create inbound delivery with refernce to outbound delivery?

    Dear all, can we create inbound delivery with refernce to outbound delivery? Regards ahmad

  • Creation of dump files

    i tried to take dumps of pages, contents areas, single sign on and so within an oracle portal environment. i created a transport set with .cmd extension but where should i run the script is it on windows command promt or oracle exp utility please hel

  • New starter layouts flow and border

    Hi I am teaching my self Java so I expect this is a simple mistake set-up a class extending a JFrame set-up a JPanel with a flow layout added 5 checks boxes this worked as I expected with the check box's moving down to the next line I then changed th

  • Can't find my serial number-HELP!

    Can't find my older key or serial number. I had to re-boot, and now I need to install Logic 8 and it's asking for the older stuff. I put it away so well as to not loose it that I can't find it!

  • Adobe Flash update killed iSight camera

    Three days ago I updated Adobe Flash on my 13'' early 2011 MacBook Pro. Since then the systems can't find the built-in camera anymore. The system profiler can't find the cam. FaceTime and Skype can't use the camera anymore. I did all the resets (SMC,