package ksiazka.kucharska;
|
|
|
|
import java.awt.Dimension;
|
|
import java.awt.EventQueue;
|
|
import java.awt.Toolkit;
|
|
|
|
/**
|
|
* Hello world!
|
|
*
|
|
*/
|
|
public class App
|
|
{
|
|
public static void main( String[] args )
|
|
{
|
|
System.out.println( "Książka Kucharska v1.0" );
|
|
EventQueue.invokeLater(new Runnable() {
|
|
public void run() {
|
|
try {
|
|
CB_View theView = new CB_View();
|
|
CB_Model theModel = new CB_Model();
|
|
CB_Controller theController = new CB_Controller(theView, theModel);
|
|
|
|
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
|
|
int x = (screenSize.width - theView.getWidth()) / 2;
|
|
int y = (screenSize.height - theView.getHeight()) / 2;
|
|
theView.setLocation(x, y);
|
|
theView.setVisible(true);
|
|
theController.fillList();
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
});
|
|
}
|
|
}
|