Skip to content

Commit d5f2d9b

Browse files
authored
Merge pull request #21 from SidaDan/master
Removed unused objects and imports
2 parents 7b5fc26 + b54b8c9 commit d5f2d9b

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

src/simplejavatexteditor/Find.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,15 @@
2323
* is only hidden (still running). We need DISPOSE_ON_CLOSE for
2424
* this JFrame.
2525
* Tested with java 8.
26+
*
27+
* @Modifiedby SidaDan
28+
* @modemail [email protected]
29+
* Removed unsused imports
2630
*/
2731

2832
package simplejavatexteditor;
2933

3034
import javax.swing.*;
31-
import java.awt.GraphicsEnvironment;
32-
import java.awt.Point;
3335
import java.awt.event.ActionListener;
3436
import java.awt.event.ActionEvent;
3537

src/simplejavatexteditor/UI.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,14 @@
2727
* Only available if the user has pressed a key
2828
* Added safety query if user pressed the clearButton
2929
*
30+
* @Modifiedby SidaDan
31+
* @modemail [email protected]
32+
* Removed unuse objects like container, Border emptyBorder
33+
* Removed unsused imports
3034
*/
3135
package simplejavatexteditor;
3236

3337
import javax.swing.*;
34-
import javax.swing.border.Border;
3538
import java.awt.*;
3639
import java.awt.event.*;
3740
import java.io.BufferedWriter;
@@ -45,7 +48,6 @@
4548
public class UI extends JFrame implements ActionListener {
4649

4750
private static final long serialVersionUID = 1L;
48-
private final Container container;
4951
private final JTextArea textArea;
5052
private final JMenuBar menuBar;
5153
private final JComboBox fontSize, fontType;
@@ -84,7 +86,6 @@ public class UI extends JFrame implements ActionListener {
8486
private boolean edit = false;
8587

8688
public UI() {
87-
container = getContentPane();
8889

8990
// Set the initial size of the window
9091
setSize(700, 500);
@@ -263,8 +264,6 @@ public void actionPerformed(ActionEvent ev) {
263264
mainToolbar = new JToolBar();
264265
this.add(mainToolbar, BorderLayout.NORTH);
265266
// used to create space between button groups
266-
Border emptyBorder = BorderFactory.createEmptyBorder(0, 0, 0, 50);
267-
268267
newButton = new JButton(newIcon);
269268
newButton.setToolTipText("New");
270269
newButton.addActionListener(this);

0 commit comments

Comments
 (0)