Skip to content

Commit

Permalink
Cited inspiration for implementations of serializing/deserializing an…
Browse files Browse the repository at this point in the history
…d for file chooser
  • Loading branch information
aricasas committed Jul 27, 2023
1 parent 4120d7c commit 717421c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

import java.io.*;

// Implementation of serializing and deserializing inspired from
// https://www.tutorialspoint.com/java/java_serialization.htm
public class FileSessionStorage implements SessionStorageG {
/**
* Saves a SessionStorage object into a file on disk.
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/views/session_load/SessionLoadMenuV.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ public void actionPerformed(ActionEvent e) {
this.controller.loadNew();
break;
case "Load session from a file":
// Implementation of file chooser inspired from
// https://www.geeksforgeeks.org/java-swing-jfilechooser/
JFileChooser j = new JFileChooser();
if (j.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {
this.controller.loadFile(j.getSelectedFile().getAbsolutePath());
Expand Down

0 comments on commit 717421c

Please sign in to comment.