1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 package org.coach.actor.componentBrowser; 26 27 import java.awt.*; 28 import javax.swing.*; 29 30 public class TclFrame extends JFrame { 31 32 public TclFrame() { 33 } 34 35 public TclFrame(Component parent, String id, String facetName, org.omg.CORBA.Object target) { 36 this.getContentPane().add(new org.coach.tcl.TclShell(target, null), BorderLayout.CENTER); 37 38 setTitle(id + " " + facetName); 39 while(!(parent instanceof JFrame || parent instanceof Frame)) { 40 parent = parent.getParent(); 41 } 42 Point pp = parent.getLocationOnScreen(); 43 setLocation(pp.x + 10, pp.y + 10);; 44 setVisible(true); 45 46 setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); 47 pack(); 48 } 49 } | Popular Tags |