【Java开源代码栏目提醒】:文章导读:在新的一年中,各位网友都进入紧张的学习或是工作阶段。网学会员整理了Java开源代码-AppStu.java的相关内容供大家参考,祝大家在新的一年里工作和学习顺利!
package appstu;
import java.awt.Toolkit;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import java.awt.Dimension;
import appstu.view.AppMain;
import appstu.util.CommonaJdbc;
import appstu.view.JF_login;
public class AppStu {
boolean packFrame = false;
/**
* Construct and show the application.
*/
public AppStu() {
CommonaJdbc Jdbc = new CommonaJdbc();
if (Jdbc != null){
JF_login frame = new JF_login();
}
// AppMain frame = new AppMain();
// Validate frames that have preset sizes
// Pack frames that have useful preferred size info, e.g. from their layout
/*if (packFrame) {
frame.pack();
} else {
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);*/
}
/**
* Application entry point.
*
* @param args String[]
*/
public static void main(String[] args) {
CommonaJdbc Jdbc = new CommonaJdbc();
if (Jdbc.conection != null){
JF_login frame = new JF_login();
}
/* SwingUtilities.invokeLater(new Runnable() {
public void run() {
try {
// UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (Exception exception) {
exception.printStackTrace();
}
new AppStu();
}
});*/
}
}