Skip to content

Commit d153a15

Browse files
committed
Make GuiAnalysis#main static
1 parent 780fbb1 commit d153a15

1 file changed

Lines changed: 12 additions & 7 deletions

File tree

src/main/java/gred/nucleus/gui/GuiAnalysis.java

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,16 @@ public class GuiAnalysis extends JFrame implements ItemListener, IDialogListener
9292
private boolean start;
9393

9494

95+
/** Default constructor */
96+
public GuiAnalysis() {
97+
this(null);
98+
}
99+
100+
95101
/**
96102
* GUI Architecture
97103
*/
98104
public GuiAnalysis(IDialogListener dialogListener) {
99-
this.dialogListener = dialogListener;
100-
101105
// Global parameter of the JFram and def of the gridBaglayout
102106
super.setTitle("NODeJ");
103107
super.setSize(550, 720);
@@ -107,7 +111,8 @@ public GuiAnalysis(IDialogListener dialogListener) {
107111
super.setBackground(Color.LIGHT_GRAY);
108112
super.setDefaultCloseOperation(DISPOSE_ON_CLOSE);
109113

110-
//this._container = getContentPane();
114+
this.dialogListener = dialogListener != null ? dialogListener : this;
115+
111116
GridBagLayout gridBagLayout = new GridBagLayout();
112117
gridBagLayout.rowWeights = new double[]{0.0, 0.0, 0.0, 0.1};
113118
gridBagLayout.rowHeights = new int[]{17, 500, 124, 7};
@@ -529,8 +534,8 @@ public GuiAnalysis(IDialogListener dialogListener) {
529534
*
530535
* @param args
531536
*/
532-
public void main(String[] args) {
533-
GuiAnalysis gui = new GuiAnalysis(this);
537+
public static void main(String[] args) {
538+
GuiAnalysis gui = new GuiAnalysis();
534539
gui.setLocationRelativeTo(null);
535540
}
536541

@@ -823,9 +828,9 @@ public void actionPerformed(ActionEvent actionEvent) {
823828
*/
824829
private class Listener implements ActionListener {
825830
/** */
826-
private final JTextField jtf;
831+
private final JTextField jtf;
827832
/** */
828-
private final boolean file;
833+
private final boolean file;
829834

830835

831836
/**

0 commit comments

Comments
 (0)