ftpserver.java
上传用户:lybcsm
上传日期:2007-04-26
资源大小:26k
文件大小:1k
- package ftpserver;
- import java.awt.*;
- import javax.swing.UIManager;
- import javax.swing.plaf.metal.MetalLookAndFeel;
- public class ftpserver {
- public ftpserver(){
- ftpframe frame= new ftpframe();
- frame.validate();
- //Center the window
- Dimension screenSize=Toolkit.getDefaultToolkit().getScreenSize();
- Dimension frameSize=frame.getSize();
- if(frameSize.height >screenSize.height){
- frameSize.height =screenSize.height;
- }
- if(frameSize.width >screenSize.width){
- frameSize.width =screenSize.width;
- }
- frame.setLocation(
- (screenSize.width -frameSize.width )/2,
- (screenSize.height -frameSize.height )/2);
- frame.setVisible(true);
- }
- public static void main (String[] args){
- try{
- UIManager.setLookAndFeel(
- "javax.swing.plaf.metal.MetalLookAndFeel");
- }
- catch(Exception e){
- e.printStackTrace();
- }
- new ftpserver();
- }
- }