java6-compat: make compat wrapper for J7 method setAutoRequestFocus()
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@577 d9718cc8-9f43-0410-858b-315f434eb58c
This commit is contained in:
parent
7473c893bd
commit
6524f9c22a
1 changed files with 14 additions and 1 deletions
|
@ -192,12 +192,25 @@ public class BudgetDialog extends JDialog
|
|||
buttonPane.add(resetBtn);
|
||||
|
||||
loadBudgetNumbers(true);
|
||||
setAutoRequestFocus(false);
|
||||
setAutoRequestFocus_compat(false);
|
||||
pack();
|
||||
setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
|
||||
setLocationRelativeTo(owner);
|
||||
}
|
||||
|
||||
private void setAutoRequestFocus_compat(boolean v)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (super.getClass().getMethod("setAutoRequestFocus", boolean.class) != null) {
|
||||
super.setAutoRequestFocus(v);
|
||||
}
|
||||
}
|
||||
catch (NoSuchMethodException e) {
|
||||
// ok to ignore
|
||||
}
|
||||
}
|
||||
|
||||
private JComponent makeTaxPane()
|
||||
{
|
||||
JPanel pane = new JPanel(new GridBagLayout());
|
||||
|
|
Reference in a new issue