Closing an inner gui

Hey Folks
I have a gui with two class's. One class is a gui and so is the other. The way i have it set up i can call the sub gui from the main gui. The problem that i'm having is that when the sub gui comes up, and i exit it, that it exits the entire program and brings me back to the dos prompt. I've tried another way of adding a button to the sub gui that calls the main gui, but it leaves the other open. The code below i think is where i should be lookin but not sure where to put the correct cmd that closes the sub gui and brings me back to the main gui
Thanks
Ambrose
public void windowClosed(WindowEvent e)
     public void windowClosing(WindowEvent e)
     public void windowDeactivated(WindowEvent e)
     public void windowDeiconified(WindowEvent e)
     public void windowIconified(WindowEvent e)
     public void windowOpened(WindowEvent e)
     }

if ( Target ==b1)
          System.out.println("Method Testing");
          //The call for the main gui
          JFrame frame = new JFrame ("Sending_Mail");
frame.setDefaultCloseOperation
peration (JFrame.EXIT_ON_CLOSE);
frame.getContentPane().add (new
add (new Sending_Mail());
frame.pack();
frame.setVisible (true);
//Atttempting to clsoe the sub guiYou're instantiating a new JFrame and disposing it. WTFO? >           new JFrame ("Sending_Mail").dispose();
     }How about posting some code that makes sense. Your first two posts don't explain or illustrate your problem at all
Cheers
DB

Similar Messages

  • Automatic closing of SAP GUI generated by RRI in WAD

    BW experts,
    I am having a showstopper scenario in our project.  Basically i have a webbased report produced by WAD 7.0 and it is working correctly.  I have an RRI connected to it.  The RRI receiver is an ABAP program which we execute based from the item in WAD (i.e document number).
    However, it always open 2 browsers. 1 is for the SAP Gui session generated by RRI and 2nd browser is open due to the code we have in our abap which calls a browser (CALL_BROWSER).
    My question now is, is there a way to put an IF-THEN condition somewhere, perhaps in javascript, where the 1st SAP gui session can be killed immediately and the 2nd browser opened?
    I have already used different components like RRI, ClOSE_WINDOW, Script_item in WAD but with no avail.
    Any ideas is highly appreciated.

    Hello,
    I’m glad that you answered me. Your feedback was helpful for me and a source of good news for our project.
    I saw the B1DE form generator, it is still axed on the screen painter, and also I saw Ibai’s project.
    I realize that SBO developers need a more powerful tool for developing their add-ons. For the same reason we have started this project and we’ll continue to develop it.
    This is not just a .srf generator and converter. A powerful feature is that our visual objects have implemented the business objects from DI API (of course you choose with what business objects the visual objects are associated, obviously for performance reasons). The business logic can be made at the designer level. It is improper to say that they generate code because the code is embedded in the visual objects, and no code line is added. For example a complex choose from list can be made in a few minutes without any code writing. In a month the SBO UI add-on generator will be ready. So you can have the add-on developed with Axel Controls in Windows forms without writing hundreds of lines, and additionally with a click the SBO UI add-on will be generated automatically (srfs, functionality, menu and the .exe). And let’s not forget that the Windows forms solution made with Axel Controls has the same feel and look as the SBO.
    If you still have ideas or suggestions please post them.
    Regards,
    Andrei Baciu.

  • Closing a running gui

    Hi
    I have one Java Gui
    public class GuiOne extends JFrame {..}
    which opens another Gui
    public class Gui2 which also extends JFrame,
    I create the container for the second gui and add one label then
    I do some processing after this but then
    "if" a certain condition happens
    I would like to close this second Gui but keep the first one open.
    Can this be done?
    Is there any way to close the second gui (Gui2)? I tryed calling
    dispose() but it didnt' seem to work and System.exit() unfortunately
    closes both of my gui!
    Any help greatly appreciated!
    Thanks
    Gerry

    Ahh, you need to call hide on the frame itself, not
    the component.
    Example:
    public MyPanel extends JPanel implements
    ActionListener {
    public void actionPerformed(ActionEvent evt) {
    Window w =
    Window w = SwingUtilities.windowForComponent(this);
    w.hide();
    Thanks very much it does the trick surely! And my first Gui stays open which is what i want!
    But it brings up this error in the command pompt , i'm not too sure if this is supposed to happen.
    I just implemented your two lines inside action performed as I dont really want it to close at the hit of a button, just kinda after the program does a bit of processing. ActionPerformed is kinda for when a button is pressed isn't it?
    .java.lang.NullPointerException
    at TimetableWithParse.<init>(TimetableWithParse.java:132)
    at PanelGui2$ButtonHandler.actionPerformed(PanelGui2.java:182)

  • SAPgui.exe is running even after closing the GUI components

    Hello All,
    Even after closing the SAP GUI components like Bex, WAD or RSA1 etc... i am able to see these processes are running under the Task Manager--> Processes....
    even if i try to restart the system, error messages are occuring...saying that SAP is still opend...
    Why it is happening, any ideas?
    Thanks,
    Ravi

    Hi Dirk,
    Thanks for your infomation. Infact, apart from this problem, i have the problem with saving the webtemplate. As it is taking much time to save a template after modifications, i had to terminate the wad process. It seems above 2 problems are related....any ideas?
    Thanks
    ravi
    Message was edited by: Ravi Pasumarty

  • Show Web Dynpro as a Pop up on CRM Web-gui from ABAP Call

    Hello Everybody,
    i have a created a Web Dynpro Application in Z'* naming Space and want to show this WD as a POP up on the CRM Business Partner.
    Step by Step Description of what I have done.
    1) Want to change the Business Partner Addresse on CRM page ( Change Addresse and Press Enter).
    2) A User-Exit 'EXIT_SAPLSZAR_001' has been Implemented to do Addresse Validation and select the Addresse which match the Addresse Search and show the data as a Pop-UP ( this Functionality work on SAP Gui perfectly).
    3) When the User comes from Web gui then naturally shows an Error, so i have created a Web Dynpro and try to call  it with  Function Module 'PRGN_GENER_EXECUTE_URL'.(Error: Frontned Error).
    Question: How can I call my Z* Web Dynpro as a Pop up from my User Exit without closing the CRM gui.
    Thank you very much.
    Regards
    Ravi

    I think you try something unsupoprted.
    http://technet.microsoft.com/en-us/library/ff393653%28v=ws.10%29.aspx
    Unsupported Scenarios:
    - Use of external links in Navigation Bar resources and Search Scopes
    Henry

  • New to Inner classes

    I was wondering the use of Inner classes in real world example with some good example.
    Thanks in Advance.

    I use Inner Classes to keep the API for my packages
    less cluttered, and when there's no current
    expectation that the class should ever be instantiated
    outside the outter class. Imagine creating JavaDocs
    to present to management, and them asking about each
    class wondering what it does, and you have to reply to
    each one, well that's a helper class that developers
    don't need to worry about. Instead, put the classes
    where they belong.
    Now, like another poster said, if the class has a
    chance to be re-used, there isn't really that much
    harm in making it outter.Every corpreate class I've taken, or heard of has said exactly what I posted. The easier it is to read the better. Now, using them for arbitrary tasks is one thing, but there is usually a way to get around it. I seen no problem in using that window closing abstract inner class, or abstract inner classes to handle buttons being pressed, but a lot of times there is an easier way to do things to make them more readable. From my experience management likes readability so they can have anyone look at the code to edit if they need to.

  • Gui auto logout

    This is regarding SAP auto logout.
    When activity is not detected in the systemfor a pre-determined period
    of time, the user is automatically logged out from the system.
    Users mentioned that they are often disturbed by phone calls from the
    vendors and need to stop working in SAP immediately. Then some time
    later the session gets closed and the data is lost, at this stage, it
    is too late for the users to do anything and they will need to restart
    whatever they were doing before.
    Is there any possibility of enhancement for this auto logout mechanism
    so that SAP gives users a chance to save the data?
    For example, a pop-up message indicating that the session will be
    closed down 5 minutes in advance of actual logout time will give a
    chance to save the data to users.
    This feature is not available in SAP standard but i do like to know whether you have customers who insist of having this and what's your workaround?
    Thank you

    Many thanks Ganesh,
    I do have the rdisp/gui_auto_logout defined. But that is not the case. What user want is that there will be a pop out message to warn user that their session has been left idle for n  number of minutes and will soon be closed before the gui actually terminated. They could be having many session open. All along we have restricted user from having multiple session (which we have done). Let me know how you manage such situation in your environment
    Cheers

  • ITunes 12 incompatible with Windows Vista Data Execution Prevention

    I just did a clean install of iTunes 12.0.1 after removing 11.4 and other components as described in Troubleshooting issues with iTunes for Windows updates. I'm running Vista Home Premium 32-bit SP2 with 3 GB RAM. Soon after closing the iTunes GUI, I get a Data Execution Prevention notification:
    I have already tested with every DEP setting except AlwaysOff, which would globally disable an important Windows security feature and is therefore not to be recommended. The problem is apparently a Buffer Overflow Exception. Here are the details from one instance:
    Product
    iTunes
    Problem
    Stopped working
    Date
    10/16/2014 7:37 PM
    Status
    Report Sent
    Problem signature
    Problem Event Name: BEX
    Application Name: iTunes.exe
    Application Version: 12.0.1.26
    Application Timestamp: 543e558b
    Fault Module Name: StackHash_d697
    Fault Module Version: 0.0.0.0
    Fault Module Timestamp: 00000000
    Exception Offset: 105059cc
    Exception Code: c0000005
    Exception Data: 00000008
    OS Version: 6.0.6002.2.2.0.768.3
    Locale ID: 1033
    Additional Information 1: d697
    Additional Information 2: 2bd40df4cf0a606a4574668730104c34
    Additional Information 3: d700
    Additional Information 4: cb2d139a5bee9dfc5c0d03df08159e62
    Extra information about the problem
    Bucket ID: 50
    This is actually not a new problem. As an experienced user of 32-bit Vista, I would have to say that the last compatible iTunes version was 11.1.5. See also Windows Vista problem reports after latest Itunes 11.2 update.

    I have been getting a "Vista Data Execution Prevention" error message whenever I closed iTunes for months now, and after reading through a few forums, I have found a solution that works.  Long story short:
    1) Start iTunes
    2) Open the Windows Task Manager
    3) Go to the "Proccess" Tab
    4) Find "AppleMobileDeviceHelper.exe *32" and right click on it.
    5) Select "Properties" from the drop down menu
    6) Go to the "Compatibility" Tab
    7) Check the Box next to "Run this program in compatibility mode for:"
    8) If "Windows XP (Service Pack 2)" is not in the field below, click on the down arrow and select said option.
    9) Click on "OK" to close the window.
    10) Close the iTunes application
    11) Reopen the iTunes application
    12) Close the iTunes application again.
    At this point you should not see anymore "Vista Data Execution Prevention" error messages when you close iTunes!
    P.S.   If you want to go back and de-select running "AppleMobileDeviceHelper.exe *32" in Windows XP Compatibility mode, you can.  Though this part is totally optional.  The next time you close iTunes, you will get one last "Vista Data Execution Prevention" error message, but don't worry, it will be the last one.  Try opening iTunes again and then closing it, and TaDa, no more error messages.  I don't know why running AppleMobileDeviceHelper.exe *32 in compatibility mode JUST ONCE solves the problem, but it worked for me.
    Happy new year \o/

  • Reinstall applications servers in EHP installation

    Hi,
    the installation guide EHP5 for ERP say this:
    "Before the downtime [page 80] begins, you uninstall all dialog instances, stop SAP Management Console (MMC) and Software Deployment Manager (SDM), stop jcmon and other standalone monitoring tools. If your central instance and SCS instance run on different hosts, you update SAP kernel and SAP IGS manually [page 81].
    But in other text of the same instalation guide say this:
    Before the downtime begins, perform the following actions:
    1. Stop all dialog instances.
    2. Stop SAP MMC now at the latest by closing the MMC application
    3. Stop SDM now at the latest by closing the SDM GUI     
    4. Stop jcmon and all other standalone monitoring tools.
    5. If your central instance and SCS instance run on different hosts, update SAP kernel and SAP IGS manually [page 81]."
    And the just say:
    The installation program asks you to perform the following actions in downtime phase:
    You change the database recovery mode.
    You start the dialog instances.
    As the guide is so confusing, one time say that unistall the AS(Dialog instance) is neccesary, but other times only say that stopping and restarting is enought.
    Then my question is:
    Need I unistall and re-install my apllication server in the EHP5 installation??
    Best Regards,
    Manfred

    Hi,
    No need to uninstall dialog instances. Just stop dialog instance before starting downtime and once downtime will finish, restart the dialog instance. If kernel of dialog instance is different (i.e. sapmnt is not shared between CI and dialog instances) then update the kernel before starting dialog instances.
    Thanks
    Sunny

  • Extracting pointer information and displaying it as an image

    Hey,
    I am using Intel's OpenCV image processing library in LabVIEW.
    There's a pointer to a struct IplImage that is passed around in order to run image processing functions.
    The struct IplImage is defined as: 
    typedef struct _IplImage
    int nSize; /* sizeof(IplImage) */
    int ID; /* version (=0)*/
    int nChannels; /* Most of OpenCV functions support 1,2,3 or 4 channels */
    int alphaChannel; /* ignored by OpenCV */
    int depth; /* pixel depth in bits: IPL_DEPTH_8U, IPL_DEPTH_8S, IPL_DEPTH_16U,
    IPL_DEPTH_16S, IPL_DEPTH_32S, IPL_DEPTH_32F and IPL_DEPTH_64F are supported */
    char colorModel[4]; /* ignored by OpenCV */
    char channelSeq[4]; /* ditto */
    int dataOrder; /* 0 - interleaved color channels, 1 - separate color channels.
    cvCreateImage can only create interleaved images */
    int origin; /* 0 - top-left origin,
    1 - bottom-left origin (Windows bitmaps style) */
    int align; /* Alignment of image rows (4 or 8).
    OpenCV ignores it and uses widthStep instead */
    int width; /* image width in pixels */
    int height; /* image height in pixels */
    struct _IplROI *roi;/* image ROI. when it is not NULL, this specifies image region to process */
    struct _IplImage *maskROI; /* must be NULL in OpenCV */
    void *imageId; /* ditto */
    struct _IplTileInfo *tileInfo; /* ditto */
    int imageSize; /* image data size in bytes
    (=image->height*image->widthStep
    in case of interleaved data)*/
    char *imageData; /* pointer to aligned image data */
    int widthStep; /* size of aligned image row in bytes */
    int BorderMode[4]; /* border completion mode, ignored by OpenCV */
    int BorderConst[4]; /* ditto */
    char *imageDataOrigin; /* pointer to a very origin of image data
    (not necessarily aligned) -
    it is needed for correct image deallocation */
    IplImage;
    I am having problems with closing OpenCV's GUI window when called from LabVIEW in Linux. A solution to this may be to not use OpenCV's GUI window in LabVIEW for Linux, but rather pass back the pointer to the processed image in LabVIEW. From that pointer, we can send it to a C wrapper to extract some information that we want from the struct in order and pass back those values to LabVIEW. Then LabVIEW will process those values and display the image. What will I need to extract from the pointer (via a C wrapper) in order to display the image onto LabVIEW?
    I attached a LabVIEW example that I found. This example loads and displays an image. I am thinking of doing something similar to that. Instead of loading an image from the file dialog, I will pass all of the necessary information to Draw Flattened Pixmap.
    Attachments:
    Picture4.vi ‏56 KB

    My description of my problems with interfacing OpenCV with LabVIEW is contained in this discussion
    Basically, the code works in C in Linux, C in Windows, LabVIEW for Windows, but not in LabVIEW for Linux.
    We finally were able to get OpenCV to interface with LabVIEW for Linux by doing some complex edition to make install. However, LabVIEW was still having trouble with the function to close all HighGUI windows. Even though it went through the function, it will not close the HighGUI window. Also the HighGUI window freezes and when it eventually closes, it crashes LabVIEW.
    When I test it by writing C programs, the function does what it is supposed to do.

  • Freezing up & app server

    Using JSC2 (build 060120) on a P4 2.6ghz w/2gig RAM, Win2K pro.
    The development environment will freeze after developing for a while, say an hour, sometimes I get lucky and it is longer.
    The problem appears to be communication with the bundled application server. Stopping and restarting the IDE does not solve the problem and is very difficult since the proces is being hogged down. The issue does not go away until I go into task manager and kill the appserv.exe process.
    Are there any plans to be able to connect directly to tomcat or other application servers instead of Sun's app server?

    I do have OutOfMemoryError: PermGen space messages in my output, but they are hours after the originally reported issue. I have seen those on previous days and simply closing down the GUI and killing the server took care of those.
    In the case yesterday, the app server seemed to take over the machine, the GUI and nearly everything else crept to a halt pretty much until I killed the application server.
    Here is one of the entries...
    [#|2006-03-14T16:33:31.279-0500|SEVERE|sun-appserver-pe8.1_02|javax.enterprise.system.container.web|_ThreadID=54;|WebModule[/LoginApplication]Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener
    java.lang.OutOfMemoryError: PermGen space

  • How to check if an object exists and how to discard it?

    Greetings,
    I have a main GUI panel in a JFrame that creates a smaller JFrame with a progress bar and text area whenever a process is initiated. I've set the default close operation to DISPOSE_ON_CLOSE as when I set it to EXIT_ON_CLOSE the main GUI panel closes as well (!). But whenever I'm closing the smaller JFrame and initiate a new thread, then the same operation is perform in parallel 2, 3 ,4 times, etc. It seems that the object of the class ProgressGUI which carries all the components of the small panel is not disposed properly. So my question is how can I check if an object exists and if yes how can I discard it? Or in other words how can I discard the JFrame of the small panel without closing the main GUI panel as well?
    thanks,
    Thomas

    I've set the default close operation to DISPOSE_ON_CLOSE thats right.
    So my question is how can I check if an object exists Whenever you create an object, save its refrence somewhere, then just check
    if(reference==null){
             //object does not exist
    }else {
            //object exists
    and if yes how can I discard it? Ensure that no references of the object to be discarded are remaining with any of the objects and then believe in 'Garbage Collector' to do the job! e.g. if there is only one reference to the frame (in your case) somewhere, you can just make an assignment like:
    reference=null;by doing this, you have made the object a candidate for garbage collection. Rest is done by 'Garbage Collector', not you.
    For cases like yours, it is better to make the small frame just once and whenever required just make the frame visible.
    e.g.
    JFrame smallFrame;
    void showSmallFrame(){
        if(smallFrame==null)smallFrame=new SmallFrame(); //or something like that
        smallFrame.setVisible(true);
    }Thanks!

  • Error while starting SWPM

    Hi,
    I am getting an error while starting SWPM.
    The error is as follows.This is after I give the ./sapinst command:
    Starting Server
    Reading server configuration.
    load resource pool /SWPM/resourcepool.xml
    : Reading service configuration SAPinstService.
    J Configuring LogManager ...
    Starting SL Controller listening on port 21212 ...
    StorageService switched off.
    Initializing SecurityManager ...
    Server certificate fingerprint is 94 55 B3 8A A4 FE 30 05 51 1B F4 2D 53 C1 7D 66
    HTTPManager switched off.
    WebstartService switched off.
    RoleService switched off.
    AlertService switched off.
    NotesService switched off.
    ProcessService switched off.
    MIDService switched off.
    Starting FileService ...
    LogService switched off.
    MailService switched off.
    Starting services ...
    Starting service "SAPinstService" ...
    Service "SAPinstService" started
    Services started.
    SL Controller started.
    Starting GUI ...
    /tmp/sapinst_exe.9109.1403059309/jre/bin/java -XX:+HeapDumpOnOutOfMemoryError -Xmx256M -cp /tmp/sapinst_exe.9109.1403059309/JAR/instgui.jar SDTGui host=localhost port=21212 service=SAPinstService -noauth
    GUI started.
    >> Invocation target exception: Can't connect to X11 window server using '172.**.**.141:0.0' as the value of the DISPLAY variable.
    >> Closed input stream
    GUI terminated with return code 4
    >> Closed input stream
    guiengine: No GUI server connected; waiting for a connection on host KEPDBPPRDZONE, port 21212 to continue with the installation
    The display variable is already set correctly.So that area is covered.
    Please give me a solution as I am not able to take export of the system.

    Hi,
    Kindly follow SCN link guiengine: No GUI Server connected; waiting for a connection on host
    and try to set display variable as DISPLAY=<IP>:0.0
    Regards,
    Gaurav

  • Fetching from a cursor and writing to a file in Pro*C

    Hi guys,
    I have a situation in hand here and I guess my "C" skills are putting me up to the test. My cursor is fetching 3 records and its all fine. I am also being able to sprintf those details and the fprintf also works perfectly -- except when I come back for Record 2, the details get overwritten and finally Record 3 is what remains on the file.
    I know that UTL_FILE.PUT_LINE works just fine in Loops but here I seem to be doing somethign wrong. Has anyone seen this problem or situation before ?
    void get_student_data(void)
       FILE   *student_file;
       char    student_file_name[100];
      exec sql begin declare section;
      exec sql end declare section;
          if ((student_file = fopen(student_file_name,"w")) == NULL)
              printf("Error opening data file!\n");
       exec sql declare student_cur cursor for
             select  s.student_id
                      to_char(s.start_date,'DD-Mon-YYYY'),
                      s.student_addr1,
                      s.student_addr2,
                      s.city,
                      s.state,
                      s.zip_code
             from   student s
             order by s.student_id;
       exec sql open student_cur;
       for (;;)
          exec sql fetch student_cur
              into  :cur_student_id,
                     :cur_start_date,
                     :cur_addr1,
                     :cur_addr2,
                     :cur_city,
                     :cur_state,
                     :cur_zip_code;
          if (sqlcode > 0)
             break;
       sprintf(out_line, "\"%d\",\"%s\",\"%s\",\"%s\",\"%s\",\"%s\","\n",
                         student_id,
                         (char *)start_date.arr,
                         (char *)addr1.arr,
                         (char *)addr2.arr,
                         (char *)city.arr,
                         (char *)state.arr,
                         (char *)zip_code.arr );
       fprintf(student_file, out_line);
       exec sql close student_cur;
       if (!student_file == NULL))
          fclose(student_file_file);
    {code}
    Thanks a bunch !
    Edited by: RDonASunnyDay on Oct 20, 2009 11:07 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Hi riedelme,
    The program is working fine. The procedure I am calling happens to be inside a FOR loop which I did not mention and that's my fault. You guys were on the right track.
    If you notice, the fclose(filename) was at the very end of the procedure but everytime the procedure is called in the out for loop, the file gets opened and closed. So, that's why the file has always one record !
    However, the logic of closing the cursor shoudl still be after closing the inner for loop.
    Thanks

  • Printing to Canon iP4000 after 10.3 - 10.4 upgrade works

    I got a new Canon PIXMA iP4000 printer and connected it to my Airport Extreme Base Station.
    I downloaded and installed the 2.6.2 drivers from Canon's site on my iMac (upgrades from 10.3 to 10.4). When I tried to add the printer, using the Printer Setup Utility, it would not automatically select my printer driver. Only a list of GIMP drivers would appear for Canon.
    I download the latest Canon printer drivers and Bonjour for Windows onto my Windows XP ThinkPad. Installed them both and printing worked flawlessly. I was glad, but not to happy about my Mac.
    Next I installed the Canon drivers on my new iBook which came preloaded with 10.4. The printer setup utility found the printer and it's driver just fine and printing worked fine.
    I then compared my iBook's /Library/Printers/Canon directory to the same directory on the iMac. There were not a 100% match, and the timestamps on the files did not match up at all. I crossed my fingers and deleted the Canon folder, then reinstalled the Canon driver I downloaded, and rebooted.
    This time the Printer Setup Utility found the driver for the Canon and printing works fine now!

    Nevermind. I discovered the problem was not properly closing the inner cover of the printer when I changed one of the ink cartridges. It had nothing to do with the recent upgrade in the system software..

Maybe you are looking for