IC SunsetThe developerWorks Connections Platform is now in read-only mode and content is only available for viewing. No new wiki pages, posts, or messages may be added. Please see our FAQ for more information. The developerWorks Connections platform will officially shut down on March 31, 2020 and content will no longer be available. More details available on our FAQ. (Read in Japanese.)
Topic
  • 4 replies
  • Latest Post - ‏2017-11-30T16:26:45Z by BalajiPSK
BalajiPSK
BalajiPSK
20 Posts

Pinned topic Issue: Rhapsody exits when exiting a GUI plug-in

‏2017-11-29T09:23:28Z | gui helper

Hi,

 

I am using a GUI based plug-in in my Rhapsody model. The plug-in loads fine and does the work fine. However, when I close the GUI window, annoyingly the Rhapsody application also does an exit.

This happens also with the DropDownMenuDemo which is provided here:

http://www-01.ibm.com/support/docview.wss?uid=swg21472423

I would like that I should be able to close the GUI and invoke it again when needed, without Rhapsody application getting closed. How do I go about it?

 

Any help will be appreciated. 

Thank you very much!

 

Regards,

Balaji

  • RhapsodyDev123
    RhapsodyDev123
    22 Posts
    ACCEPTED ANSWER

    Re: Issue: Rhapsody exits when exiting a GUI plug-in

    ‏2017-11-30T15:10:13Z  
    • BalajiPSK
    • ‏2017-11-30T08:30:06Z

    Hey!

     

    I have used swing and awt to build my gui, adn of course the Rhapsody API to get stuff done. 

    Everything works as expected, except when I hit  'Close(X)' on my plug-ins GUI. Then Rhapsody main application also exits.

     

    Regards,

    Balaji

    I can't say I've had the same issue, but in my Swing constructor I have the following line that handles closing the GUI:

    setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);

    Let me know if that helps!

  • RhapsodyDev123
    RhapsodyDev123
    22 Posts

    Re: Issue: Rhapsody exits when exiting a GUI plug-in

    ‏2017-11-29T18:31:43Z  

    What are you using to build you GUI? I have had success building a custom Swing application using Java and the Rhapsody API. It allows you to have control over when happens when it opens/closes, etc.

  • BalajiPSK
    BalajiPSK
    20 Posts

    Re: Issue: Rhapsody exits when exiting a GUI plug-in

    ‏2017-11-30T08:30:06Z  

    What are you using to build you GUI? I have had success building a custom Swing application using Java and the Rhapsody API. It allows you to have control over when happens when it opens/closes, etc.

    Hey!

     

    I have used swing and awt to build my gui, adn of course the Rhapsody API to get stuff done. 

    Everything works as expected, except when I hit  'Close(X)' on my plug-ins GUI. Then Rhapsody main application also exits.

     

    Regards,

    Balaji

  • RhapsodyDev123
    RhapsodyDev123
    22 Posts

    Re: Issue: Rhapsody exits when exiting a GUI plug-in

    ‏2017-11-30T15:10:13Z  
    • BalajiPSK
    • ‏2017-11-30T08:30:06Z

    Hey!

     

    I have used swing and awt to build my gui, adn of course the Rhapsody API to get stuff done. 

    Everything works as expected, except when I hit  'Close(X)' on my plug-ins GUI. Then Rhapsody main application also exits.

     

    Regards,

    Balaji

    I can't say I've had the same issue, but in my Swing constructor I have the following line that handles closing the GUI:

    setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);

    Let me know if that helps!

  • BalajiPSK
    BalajiPSK
    20 Posts

    Re: Issue: Rhapsody exits when exiting a GUI plug-in

    ‏2017-11-30T16:26:45Z  

    I can't say I've had the same issue, but in my Swing constructor I have the following line that handles closing the GUI:

    setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);

    Let me know if that helps!

    Hey!

    That works like a charm!

    This was indeed the issue. Thanks a ton!

     

    Regards,

    Balaji