mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
Fixed ClassCastException for Client windows
This commit is contained in:
parent
d055c5e804
commit
375cc311b9
1 changed files with 15 additions and 13 deletions
|
@ -415,19 +415,21 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
|
||||||
MagePaneMenuItem menuItem;
|
MagePaneMenuItem menuItem;
|
||||||
|
|
||||||
for (int i = 0; i < windows.length; i++) {
|
for (int i = 0; i < windows.length; i++) {
|
||||||
MagePane window = (MagePane) windows[i];
|
if (windows[i] instanceof MagePane) {
|
||||||
if (window.isVisible()) {
|
MagePane window = (MagePane) windows[i];
|
||||||
menuItem = new MagePaneMenuItem(window);
|
if (window.isVisible()) {
|
||||||
menuItem.setState(i == 0);
|
menuItem = new MagePaneMenuItem(window);
|
||||||
menuItem.addActionListener(new ActionListener() {
|
menuItem.setState(i == 0);
|
||||||
@Override
|
menuItem.addActionListener(new ActionListener() {
|
||||||
public void actionPerformed(ActionEvent ae) {
|
@Override
|
||||||
MagePane frame = ((MagePaneMenuItem) ae.getSource()).getFrame();
|
public void actionPerformed(ActionEvent ae) {
|
||||||
setActive(frame);
|
MagePane frame = ((MagePaneMenuItem) ae.getSource()).getFrame();
|
||||||
}
|
setActive(frame);
|
||||||
});
|
}
|
||||||
menuItem.setIcon(window.getFrameIcon());
|
});
|
||||||
menu.add(menuItem);
|
menuItem.setIcon(window.getFrameIcon());
|
||||||
|
menu.add(menuItem);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue