How to use method in my common library:
Frame Constructor
-
try {
-
jbInit();
-
if (null == p_rect) {
-
this.setLocation(dim.width/2-this.getSize().width/2, dim.height/2-this.getSize().height/2);
-
} else {
-
this.setLocation(p);
-
};
-
e.printStackTrace();
-
}
-
}
Frame jbInit
Action to open
-
{
-
putValue(NAME, "OpenModalFrame");
-
}
-
-
//Find parent that is a frame for getbounds
-
{
-
comp = comp.getParent();
-
}
-
trunkObjectFrame dlg;
-
try {
-
dlg = new trunkObjectFrame(ownerFrame.getBounds());
-
JOptionPane.showMessageDialog(null, "There was an error reading data from settings file " + f.toString());
-
f.printStackTrace();
-
return;
-
}
-
//dlg.setVisible(true);
-
ModalFrameUtil.showAsModal(dlg, ownerFrame);
-
ownerFrame.setVisible(true); //make sure owner stays visible when frame is closed
-
}
-
};
RJM Article Type
Work Notes