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 MethodFrame extends JFrame { 31 32 public MethodFrame() { 33 } 34 35 public MethodFrame(Component parent, String id, String facetName, org.omg.CORBA.Object target, org.omg.CORBA.ORB orb) { 36 this.getContentPane().add(new MethodPanel(this, id, facetName, target, orb), BorderLayout.CENTER); 37 38 setTitle(id + " " + facetName); 39 Dimension screen = Toolkit.getDefaultToolkit().getScreenSize(); 40 setLocation((screen.width) / 2, (screen.height) / 2); 41 setVisible(true); 42 43 setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); 44 pack(); 45 } 46 } | Popular Tags |