Center progress bar on drawing.
This commit is contained in:
parent
823ed07770
commit
094840f152
@ -68,9 +68,6 @@ public class GraphReaderProgressBar extends JDialog implements GraphReaderObserv
|
|||||||
|
|
||||||
setContentPane(pane);
|
setContentPane(pane);
|
||||||
|
|
||||||
// setModal(true);
|
|
||||||
setLocationRelativeTo(owner);
|
|
||||||
|
|
||||||
pack();
|
pack();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -518,7 +518,9 @@ public class MainWindow extends JFrame {
|
|||||||
else {
|
else {
|
||||||
reader = new BinaryGraphReader(stream);
|
reader = new BinaryGraphReader(stream);
|
||||||
}
|
}
|
||||||
reader.addObserver(new GraphReaderProgressBar(MainWindow.this));
|
GraphReaderProgressBar progressBar = new GraphReaderProgressBar(MainWindow.this);
|
||||||
|
progressBar.setLocationRelativeTo(mainPanel.getLeftComponent());
|
||||||
|
reader.addObserver(progressBar);
|
||||||
try {
|
try {
|
||||||
graph = reader.read();
|
graph = reader.read();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user