javauser-interfacetcltk-toolkitjacl

Java GUI for Tcl


I'm having some trouble writing a GUI in Java that can interact with Tcl scripts. When a Tcl script is run, I want information passed to this GUI and displayed. Further inputted information on the GUI should be able to be returned back to the script.

I'm currently using Tcl/Java. Unfortunately, I am using Teamcenter and according to the user manual, the Tk toolkit is not supported. So I'm trying to work with Swing again.

This is what I've tried to get to work for Swing, but nothing shows up when I run the script:

package require java

java::import javax.swing.JFrame 
set window [java::new javax.swing.JFrame] 
$window setSize 100 100
$window setVisible true

I've also found out about Swank, but there seems to be little documentation on it, so I'm not sure how to proceed.

Any advice on how to best approach this? Or where to find additional resources?


Solution

  • Teamcenter doesn't support "external customizations".

    I wrote the GUI in Java separately and ended up using Teamcenter's internal API to get the GUI to display.