Java Reference
In-Depth Information
package gui;
import javax.swing.WindowConstants;
import javax.swing.SwingUtilities;
public class JFrame1 extends javax.swing.JFrame {
/**
* Auto-generated main method to display this JFrame
*/
public static void main(String[] args) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
JFrame1 inst = new JFrame1();
inst.setLocationRelativeTo(null);
inst.setVisible(true);
}
});
}
public JFrame1() {
super();
initGUI();
}
private void initGUI() {
try {
setDefaultCloseOperation(
WindowConstants.DISPOSE_ON_CLOSE);
pack();
setSize(400, 300);
} catch (Exception e) {
//add your error handling code here
e.printStackTrace();
}
}
}
Listing 9.1 Von Eclipse und Jigloo generierter Quellcode
Search WWH ::




Custom Search