@ -34,7 +34,7 @@ public class MoveSubcontactMessageDialog
= new JLabel ( Messages . getString ( "moveSubcontact" ) ) ;
private JLabel iconLabel = new JLabel (
new ImageIcon ( ImageLoader . getImage ( ImageLoader . WARNING _ICON) ) ) ;
new ImageIcon ( ImageLoader . getImage ( ImageLoader . INFO _ICON) ) ) ;
private JButton cancelButton = new JButton ( Messages . getString ( "cancel" ) ) ;
@ -65,8 +65,6 @@ public MoveSubcontactMessageDialog(MainFrame parentWindow,
this . mainPanel . setPreferredSize (
new Dimension ( dialogWidth , dialogHeight ) ) ;
this . computeDialogLocation ( mainFrame ) ;
this . cancelButton . addActionListener ( new ActionListener ( ) {
public void actionPerformed ( ActionEvent e ) {
dispose ( ) ;
@ -105,7 +103,7 @@ public void actionPerformed(ActionEvent e) {
* or the right side of the main application window .
* @param parentWindow the main application window
* /
private void compute DialogLocation( JFrame parentWindow )
private void set DialogLocation( JFrame parentWindow )
{
int dialogY = ( int ) Toolkit . getDefaultToolkit ( )
. getScreenSize ( ) . getHeight ( ) / 2 - dialogHeight / 2 ;
@ -126,4 +124,11 @@ protected void close(boolean isEscaped)
{
this . cancelButton . doClick ( ) ;
}
public void setVisible ( boolean isVisible )
{
super . setVisible ( isVisible ) ;
this . setDialogLocation ( mainFrame ) ;
}
}