1 16 package sample.mtom.client; 17 18 import java.awt.Dimension ; 19 import java.awt.HeadlessException ; 20 import java.awt.Toolkit ; 21 22 import javax.swing.JFrame ; 23 import javax.swing.WindowConstants ; 24 25 public class MTOMClient extends JFrame { 26 27 public MTOMClient(String title) throws HeadlessException { 28 super(title); 29 30 this.getContentPane().add(new UserInterface(this)); 31 this.show(); 32 } 33 34 public static void main(String [] args) { 35 MTOMClient form = new MTOMClient("MTOM Sample Client"); 36 Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); 37 form.setLocation(screenSize.width / 4 - 20, 38 screenSize.height / 4); 39 form.setSize(screenSize.width / 2 - 80, screenSize.height / 2); 40 form.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); 41 form.show(); 42 } 43 } 44 | Popular Tags |