remove useless, requestFocus

This commit is contained in:
Ethan
2019-12-15 20:41:31 -06:00
parent b5183f51c3
commit de6a734588
2 changed files with 4 additions and 41 deletions
@@ -33,6 +33,8 @@ public final class BotFrame extends JFrame implements ActionListener {
setLocationRelativeTo(getParent());
setLocationRelativeTo(getOwner());
setVisible(true);
requestFocus();
toFront();
applet.initClientFrame(766, 536);
System.out.println("Client Launched.");
}
+2 -41
View File
@@ -10,7 +10,7 @@ public class BotMenuBar extends JMenuBar {
private BotFrame botUI;
private JButton startButton, pauseButton, stopButton;
private JMenu features, file, scripts;
private JMenuItem cacheClear, notifications, run, pause, stop;
private JMenuItem run, pause, stop;
public BotMenuBar(BotFrame botUI) {
this.botUI = botUI;
@@ -28,14 +28,7 @@ public class BotMenuBar extends JMenuBar {
features = new JMenu("Features");
scripts = new JMenu("Script");
JMenuItem screenshot = new JMenuItem("Create screenshot");
JMenuItem proxy = new JMenuItem("Network");
JMenuItem randoms = new JMenuItem("Randoms");
JMenuItem dialog = new JCheckBoxMenuItem("Disable dialog");
JMenuItem logger = new JCheckBoxMenuItem("Logger");
JMenuItem explorer = new JMenuItem("Reflection explorer");
JMenuItem exit = new JMenuItem("Exit");
final JMenuItem exit = new JMenuItem("Exit");
run = createNewJMenuItem( "Run", true);
@@ -44,38 +37,14 @@ public class BotMenuBar extends JMenuBar {
stop = createNewJMenuItem("Stop", false);
cacheClear = new JMenuItem("Clear cache");
//cacheClear.setIcon(new ImageIcon(Images.getResource("/storage/images/trash.png")));
notifications = new JMenuItem("Notifications");
//notifications.setIcon(new ImageIcon(Images.getResource("/storage/images/bell.png")));
screenshot.addActionListener(botUI);
proxy.addActionListener(botUI);
randoms.addActionListener(botUI);
dialog.addActionListener(botUI);
logger.addActionListener(botUI);
explorer.addActionListener(botUI);
exit.addActionListener(botUI);
cacheClear.addActionListener(botUI);
notifications.addActionListener(botUI);
scripts.add(run);
scripts.add(pause);
scripts.add(stop);
file.add(screenshot);
file.add(proxy);
file.add(randoms);
file.add(dialog);
file.add(logger);
file.add(explorer);
file.add(exit);
features.add(cacheClear);
features.add(notifications);
/* startButton = createNewButton(new ImageIcon(Images.getResource("/storage/images/run_button.png")), "Run Script", "Run", true);
@@ -125,14 +94,6 @@ public class BotMenuBar extends JMenuBar {
return file;
}
public JMenuItem getCacheClear() {
return cacheClear;
}
public JMenuItem getNotifications() {
return notifications;
}
public JButton getStartButton() {
return startButton;
}