|
27 | 27 | * Only available if the user has pressed a key
|
28 | 28 | * Added safety query if user pressed the clearButton
|
29 | 29 | *
|
| 30 | + * @Modifiedby SidaDan |
| 31 | + |
| 32 | + * Removed unuse objects like container, Border emptyBorder |
| 33 | + * Removed unsused imports |
30 | 34 | */
|
31 | 35 | package simplejavatexteditor;
|
32 | 36 |
|
33 | 37 | import javax.swing.*;
|
34 |
| -import javax.swing.border.Border; |
35 | 38 | import java.awt.*;
|
36 | 39 | import java.awt.event.*;
|
37 | 40 | import java.io.BufferedWriter;
|
|
45 | 48 | public class UI extends JFrame implements ActionListener {
|
46 | 49 |
|
47 | 50 | private static final long serialVersionUID = 1L;
|
48 |
| - private final Container container; |
49 | 51 | private final JTextArea textArea;
|
50 | 52 | private final JMenuBar menuBar;
|
51 | 53 | private final JComboBox fontSize, fontType;
|
@@ -84,7 +86,6 @@ public class UI extends JFrame implements ActionListener {
|
84 | 86 | private boolean edit = false;
|
85 | 87 |
|
86 | 88 | public UI() {
|
87 |
| - container = getContentPane(); |
88 | 89 |
|
89 | 90 | // Set the initial size of the window
|
90 | 91 | setSize(700, 500);
|
@@ -263,8 +264,6 @@ public void actionPerformed(ActionEvent ev) {
|
263 | 264 | mainToolbar = new JToolBar();
|
264 | 265 | this.add(mainToolbar, BorderLayout.NORTH);
|
265 | 266 | // used to create space between button groups
|
266 |
| - Border emptyBorder = BorderFactory.createEmptyBorder(0, 0, 0, 50); |
267 |
| - |
268 | 267 | newButton = new JButton(newIcon);
|
269 | 268 | newButton.setToolTipText("New");
|
270 | 269 | newButton.addActionListener(this);
|
|
0 commit comments