<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: J-Link + Swing GUI in Customization</title>
    <link>https://www.ptcusercommunity.com/t5/Customization/J-Link-Swing-GUI/m-p/1059561#M14856</link>
    <description>&lt;P&gt;Thank you for providing the solution. However, at this moment, when this solution is applied and the JDialog is launched, the Creo interface gets stuck. Is there any good method to solve this problem?&lt;/P&gt;</description>
    <pubDate>Sat, 21 Mar 2026 09:14:51 GMT</pubDate>
    <dc:creator>Kzal</dc:creator>
    <dc:date>2026-03-21T09:14:51Z</dc:date>
    <item>
      <title>J-Link + Swing GUI</title>
      <link>https://www.ptcusercommunity.com/t5/Customization/J-Link-Swing-GUI/m-p/271365#M2631</link>
      <description>I've created a J-Link application, which has a swing GUI. On click of a UI command button, I'm creating a part files (simulating File--&amp;gt; New Part). The same thing when wanted to simulate through a swing GUI in synchronous mode, the GUI gets created, but when I push the</description>
      <pubDate>Thu, 03 May 2018 09:20:49 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Customization/J-Link-Swing-GUI/m-p/271365#M2631</guid>
      <dc:creator>mali</dc:creator>
      <dc:date>2018-05-03T09:20:49Z</dc:date>
    </item>
    <item>
      <title>Re: J-Link + Swing GUI</title>
      <link>https://www.ptcusercommunity.com/t5/Customization/J-Link-Swing-GUI/m-p/271366#M2632</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok Finally got it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is possible to call an PROE action from a swing GUI. Use the following code to test it. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Conclusion: &lt;/P&gt;&lt;P&gt;JFrame doesnt work in Synchronous J-Link application&lt;/P&gt;&lt;P&gt;JDialog works in Synchronous application by seeting the flag "setModal(true);"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="java" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_14113766186038627" jivemacro_uid="_14113766186038627"&gt;&lt;P&gt;/*&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; 07-Feb-00 I-03-26 JCN $$1 Renamed and upgraded.&lt;/P&gt;&lt;P&gt; 30-Jan-03 J-03-41 JCN $$2 Install test adds menu button.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; */&lt;/P&gt;&lt;P&gt;import java.awt.event.ActionEvent;&lt;/P&gt;&lt;P&gt;import java.awt.event.ActionListener;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;import javax.swing.JButton;&lt;/P&gt;&lt;P&gt;import javax.swing.JDialog;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;import com.ptc.cipjava.jxthrowable;&lt;/P&gt;&lt;P&gt;import com.ptc.pfc.pfcCommand.DefaultUICommandActionListener;&lt;/P&gt;&lt;P&gt;import com.ptc.pfc.pfcCommand.UICommand;&lt;/P&gt;&lt;P&gt;import com.ptc.pfc.pfcGlobal.pfcGlobal;&lt;/P&gt;&lt;P&gt;import com.ptc.pfc.pfcModel.Model;&lt;/P&gt;&lt;P&gt;import com.ptc.pfc.pfcSession.Session;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/**&lt;/P&gt;&lt;P&gt; * This class is used to start the jlink application in proe. The name of the&lt;/P&gt;&lt;P&gt; * class has to appear in the protk.dat under the java_app_class option.&lt;/P&gt;&lt;P&gt; **/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;public class JlinkSwingTest {&lt;/P&gt;&lt;P&gt; // =========================================================================&lt;/P&gt;&lt;P&gt; /**&lt;/P&gt;&lt;P&gt;  * This method is called by proe upon starting a jlink application This&lt;/P&gt;&lt;P&gt;  * method gets the current session from the pfcGlobal(environment) Then it&lt;/P&gt;&lt;P&gt;  * calls the install test with the session as the argument.&lt;/P&gt;&lt;P&gt;  **/&lt;/P&gt;&lt;P&gt; public static void start() {&lt;/P&gt;&lt;P&gt; printMsg("Started");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; try {&lt;/P&gt;&lt;P&gt; Session curSession = pfcGlobal.GetProESession();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; UICommand cmd = curSession.UICreateCommand("MyFirstApp",&lt;/P&gt;&lt;P&gt; new MenuButtonListener());&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; curSession.UIAddButton(cmd, "File", null, "MyButton", "HelpTag",&lt;/P&gt;&lt;P&gt; "msg_JlinkSwingTest.txt");&lt;/P&gt;&lt;P&gt; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; catch (jxthrowable x) {&lt;/P&gt;&lt;P&gt; printMsg("something wrong: " + x);&lt;/P&gt;&lt;P&gt; x.printStackTrace();&lt;/P&gt;&lt;P&gt; System.out.println("------------------------------------");&lt;/P&gt;&lt;P&gt; }&lt;/P&gt;&lt;P&gt; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; // =========================================================================&lt;/P&gt;&lt;P&gt; /**&lt;/P&gt;&lt;P&gt;  * This method is used for cleanup and etc... Called when the jlink&lt;/P&gt;&lt;P&gt;  * application exits&lt;/P&gt;&lt;P&gt;  */&lt;/P&gt;&lt;P&gt; public static void stop() {&lt;/P&gt;&lt;P&gt; printMsg("Stop");&lt;/P&gt;&lt;P&gt; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; // =========================================================================&lt;/P&gt;&lt;P&gt; /**&lt;/P&gt;&lt;P&gt;  * This method prints a string to the standard output.&lt;/P&gt;&lt;P&gt;  */&lt;/P&gt;&lt;P&gt; public static void printMsg(String msg) {&lt;/P&gt;&lt;P&gt; System.out.println("JLINK-Testing: " + msg);&lt;/P&gt;&lt;P&gt; }&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/**&lt;/P&gt;&lt;P&gt; * @author XXXXXX&lt;/P&gt;&lt;P&gt; *&lt;/P&gt;&lt;P&gt; */&lt;/P&gt;&lt;P&gt;class MenuButtonListener extends DefaultUICommandActionListener {&lt;/P&gt;&lt;P&gt; public void OnCommand() {&lt;/P&gt;&lt;P&gt; try {&lt;/P&gt;&lt;P&gt; JDialog f = new JDialog();&lt;/P&gt;&lt;P&gt; JButton jb = new JButton("Testing1");&lt;/P&gt;&lt;P&gt; jb.addActionListener(new ActionListener() {&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; public void actionPerformed(ActionEvent e) {&lt;/P&gt;&lt;P&gt; // TODO Auto-generated method stub&lt;/P&gt;&lt;P&gt; try {&lt;/P&gt;&lt;P&gt; Session curSession = pfcGlobal.GetProESession();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Model tryModel = curSession.CreatePart("Testing1");&lt;/P&gt;&lt;P&gt; tryModel.Display();&lt;/P&gt;&lt;P&gt; } catch (jxthrowable x) {&lt;/P&gt;&lt;P&gt; x.printStackTrace();&lt;/P&gt;&lt;P&gt; System.out&lt;/P&gt;&lt;P&gt; .println("------------------------------------");&lt;/P&gt;&lt;P&gt; }&lt;/P&gt;&lt;P&gt; }&lt;/P&gt;&lt;P&gt; });&lt;/P&gt;&lt;P&gt; f.add(jb);&lt;/P&gt;&lt;P&gt; f.pack();&lt;/P&gt;&lt;P&gt; f.setModal(true);&lt;/P&gt;&lt;P&gt; f.setVisible(true);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; } catch (Exception x) {&lt;/P&gt;&lt;P&gt; x.printStackTrace();&lt;/P&gt;&lt;P&gt; System.out.println("------------------------------------");&lt;/P&gt;&lt;P&gt; }&lt;/P&gt;&lt;P&gt; }&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Sep 2014 09:06:55 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Customization/J-Link-Swing-GUI/m-p/271366#M2632</guid>
      <dc:creator>mali</dc:creator>
      <dc:date>2014-09-22T09:06:55Z</dc:date>
    </item>
    <item>
      <title>Re: J-Link + Swing GUI</title>
      <link>https://www.ptcusercommunity.com/t5/Customization/J-Link-Swing-GUI/m-p/1059561#M14856</link>
      <description>&lt;P&gt;Thank you for providing the solution. However, at this moment, when this solution is applied and the JDialog is launched, the Creo interface gets stuck. Is there any good method to solve this problem?&lt;/P&gt;</description>
      <pubDate>Sat, 21 Mar 2026 09:14:51 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Customization/J-Link-Swing-GUI/m-p/1059561#M14856</guid>
      <dc:creator>Kzal</dc:creator>
      <dc:date>2026-03-21T09:14:51Z</dc:date>
    </item>
  </channel>
</rss>

