IBM Support

Using JOptionPane in Java API plugins with IBM Rational Rhapsody results in Rhapsody application freezing in the background

Troubleshooting


Problem

JOptionPane is a Java object that allows a quick way to add simple dialogs to your Java application. However, when using this dialog object with the Rhapsody Java API, the dialog obscures the view of the Rhapsody applications graphical user interface.

Cause

You have used JOptionPane in a Rhapsody API plugin but the Rhapsody user interface hangs/blurs when the JOptionPane dialog is visible.

Resolving The Problem

JOptionPane objects are modal. If you want to view the Rhapsody application in the background while the JOptionPane object is visible in the foreground, you must use a model object instead. For example, you should use JDialog rather than JOptionPane.

Please refer to the third party Java documentation on how to use modality with dialogs.

[{"Product":{"code":"SSB2MU","label":"IBM Engineering Systems Design Rhapsody"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"General Information","Platform":[{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"8.0;8.0.1;8.0.2;8.0.3;8.0.4;8.0.5;8.0.6;8.1;8.1.1;8.1.2;8.1.2.1;8.1.3;8.1.4;8.1.5;8.2;8.2.1","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Product Synonym

Rational Rhapsody

Document Information

Modified date:
27 May 2022

UID

swg22007219