| 1159 | } |
| 1160 | |
| 1161 | private static void createLogicAddButton(String buttonText, String appendText, JPanel panel, JTextField textField) { |
| 1162 | // 创建按钮 |
| 1163 | JButton button = new JButton(buttonText); |
| 1164 | button.setFocusPainted(false); // 不显示按钮焦点外边框 |
| 1165 | button.setFocusable(false); // 禁止按钮获取焦点 |
| 1166 | |
| 1167 | // 添加点击事件 |
| 1168 | button.addActionListener(new ActionListener() { |
| 1169 | @Override |
| 1170 | public void actionPerformed(ActionEvent actionEvent) { |
| 1171 | if (textField.getText().contains("fofaEX: FOFA Extension")) { |
| 1172 | textField.setText(""); |
| 1173 | } |
| 1174 | // 追加指定文本到文本框中 |
| 1175 | textField.setText(textField.getText() + " " + appendText); |
| 1176 | } |
| 1177 | }); |
| 1178 | // 将按钮添加到指定面板中 |
| 1179 | panel.add(button); |
| 1180 | } |
| 1181 | |
| 1182 | private static void searchButton(String buttonText, boolean shouldSetSize, JPanel panel, JTextField textField, JTextField emailField, JTextField keyField, JTextField urlField, JPanel resultPanel, JPanel exportPanel, JLabel changeIcon, JPanel disablePanel2, JPanel disablePanel3, JPanel disablePanel7, JPanel totalPanel8, String pageButton) { |
| 1183 | |