ftpserver.java~2~
上传用户: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();
- }
- }