Home > database >  MYECLIPSE portal rookie readme
MYECLIPSE portal rookie readme

Time:10-21

Package com. MWQ;

Import the Java. The awt. Dimension;
Import the Java. The awt. Toolkit;

The import javax.mail. Swing. SwingUtilities;
The import javax.mail. Swing. UIManager;

The import com. MWQ. Frame. IndexFrame;
The import com. MWQ. Frame. LandFrame;
The import com. MWQ. Hibernate. Dao;

Public class PersonnelManage {

Boolean packFrame=false;

Public PersonnelManage () {
SwingUtilities. InvokeLater (new Runnable () {
Public void the run () {
Try {
UIManager. SetLookAndFeel (UIManager
GetSystemLookAndFeelClassName ());
{} the catch (Exception Exception)
Exception. PrintStackTrace ();
}
Land ();
}
});
}

Public void land () {
LandFrame frame=new LandFrame ();
If (packFrame) {
frame.pack();
} else {
Frame. The validate ();
}

//Center the window
Dimension screenSize=Toolkit. GetDefaultToolkit (.) getScreenSize ();
Dimension frameSize=frame. GetSize ();
If (frameSize. Height & gt; ScreenSize. Height) {
FrameSize. Height=screenSize. Height;
}
If (frameSize. Width & gt; 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) {
New PersonnelManage ();
}

}

CodePudding user response:

Brother, your code is not complete, import a few less kind inside, how to debug, and what is to solve the problem, here also don't know,
  • Related