Skip to content

Commit

Permalink
Remote file window child of main JFrame
Browse files Browse the repository at this point in the history
Before the two where separate JFrame's which could spell trouble when more instances are had and other things. So this fixes that issue by making it a JDialog.
  • Loading branch information
AvocadoMoon committed Dec 5, 2023
1 parent 76b5c6f commit 6fe7e7d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/java/org/vcell/vcellfiji/UI/N5ViewerGUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public void actionPerformed(ActionEvent e) {
this.setContentPane(this.mainPanel);
this.setSize(500, 400);
this.setVisible(true);
this.remoteFileSelection = new RemoteFileSelection();
this.remoteFileSelection = new RemoteFileSelection(thisJFrame);


}
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/org/vcell/vcellfiji/UI/RemoteFileSelection.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import java.awt.event.ActionListener;
import java.util.HashMap;

public class RemoteFileSelection extends JFrame{
public class RemoteFileSelection extends JDialog{
private JPanel mainPanel;
private JTextField linkTextField;
private JTextField s3AccessKeyTextField;
Expand All @@ -19,7 +19,8 @@ public class RemoteFileSelection extends JFrame{
private JPanel credentialsPanel;
private JPanel endpointPanel;

public RemoteFileSelection(){
public RemoteFileSelection(JFrame parentFrame){
super(parentFrame, true);
this.setTitle("Remote File Selection");
this.setContentPane(this.mainPanel);
this.setSize(500, 350);
Expand Down

0 comments on commit 6fe7e7d

Please sign in to comment.