... per eliminare la chiamata a getCenterPane dal costruttore, ho fatto questa piccola modifica:
in AbsDialogOK_ANN
dunque... in LogInGUIcodice:publicAbsDialogOK_ANN(String title){ super(newJFrame(),title,true); this.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); this.setResizable(false); // this.setContentPane(this.getJCP()); // finalDimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize(); //this.setSize(newDimension(screenSize.width /2,screenSize.height /2)); // this.setLocation((screenSize.width -this.getWidth())/2,(screenSize.height -this.getHeight())/2); // this.setVisible(true); } protected void init(){ this.setContentPane(this.getJCP()); }
sembra si siano risolti i problemi...codice:public LogInGUI(){ super("Login"); this.init(); } @Override protected void init(){ super.init(); final Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize(); this.setSize(newDimension(screenSize.width /2,screenSize.height /2)); this.setLocation((screenSize.width -this.getWidth())/2,(screenSize.height -this.getHeight())/2); this.setVisible(true); }
Attendo comunque eventuali consigli

Rispondi quotando