Skip to content
Snippets Groups Projects
Verified Commit dca3fbec authored by tristan.muller's avatar tristan.muller Committed by philippe.verley_ird.fr
Browse files

Fix the JProgressFrame centering

parent 9be14232
No related branches found
No related tags found
No related merge requests found
......@@ -41,6 +41,13 @@ public class JProgressFrame extends FrameView {
public JProgressFrame() throws Exception {
super();
setLocationRelativeTo(getParent());
setResizable(false);
setVisible(true);
if (onInitCallback != null) {
onInitCallback.run();
}
}
public void setOnInitCallback(final Runnable onInitCallback) {
......@@ -60,14 +67,11 @@ public class JProgressFrame extends FrameView {
@Override
protected void initContainer() throws Exception {
setLocationRelativeTo(getParent());
setIconImage(loadIcon("/icons/progression.png").getImage());
setVisible(true);
setResizable(false);
if (onInitCallback != null) {
onInitCallback.run();
}
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
setTitle("Progression");
getContentPane().setLayout(new javax.swing.BoxLayout(getContentPane(),
javax.swing.BoxLayout.PAGE_AXIS));
}
@Override
......@@ -77,11 +81,6 @@ public class JProgressFrame extends FrameView {
jPanelStatus = new javax.swing.JPanel();
jLabelStatus = new javax.swing.JLabel();
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
setTitle("Progression");
getContentPane().setLayout(new javax.swing.BoxLayout(getContentPane(),
javax.swing.BoxLayout.PAGE_AXIS));
jProgressBar.setPreferredSize(new java.awt.Dimension(500, 19));
jPanelProgress.add(jProgressBar);
......@@ -94,6 +93,5 @@ public class JProgressFrame extends FrameView {
pack();
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment