I've searched through the forums but keep coming up empty for a solution.I'm making a sort of library with a GUI program. What I want is for it to save entries via a text file. I can create objects fine with the methods I have, and can save them to a file easily. The problem comes from starting up the program again and populating a Vector with values in the text file. The objects I'm adding have a String value, followed by 7 booleans. When I try to load up from file, the String value is empty ("") and all booleans are false.How do I get it to read the text before starting the rest of the GUI and filling the Vector right?EDIT: Sorry for being very vague about it all. I'll post the code, but it's about 337 lines long..\[code\]import java.awt.Container;import java.awt.FlowLayout;import java.awt.GridLayout;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import java.io.File;import java.io.FileNotFoundException;import java.io.PrintWriter;import java.util.Collections;import java.util.Scanner;import java.util.Vector;import javax.swing.JButton;import javax.swing.JCheckBox;import javax.swing.JComboBox;import javax.swing.JFrame;import javax.swing.JLabel;import javax.swing.JOptionPane;import javax.swing.JPanel;import javax.swing.JTextField;@SuppressWarnings("serial")public class SteamLibraryGUI extends JFrame implements ActionListener{ //For main window private JButton exitButton, addEntry, editEntry, removeEntry; private JLabel selectGame, gameCount; private JComboBox<String> gameCombo; private Vector<Game> gamesList = new Vector<Game>(); private Vector<String> titleList = new Vector<String>(); private int numGames = gamesList.size(); private int selectedGame; //For add window private JFrame addFrame; private JLabel gameTitle = new JLabel("Title:"); private JTextField titleText = new JTextField(60); private JCheckBox singleBox, coopBox, multiBox, cloudBox, controllerBox, achieveBox, pcBox; private JButton addGame, addCancel; //For edit window private JFrame editFrame; private JButton editGame, editCancel; public SteamLibraryGUI() { setTitle("Steam Library Organizer"); addEntry = new JButton("Add a game"); editEntry = new JButton("Edit a game"); removeEntry = new JButton("Remove a game"); exitButton = new JButton("Exit"); selectGame = new JLabel("Select a game:"); gameCount = new JLabel("Number of games:"+numGames); gameCombo = new JComboBox<String>(titleList); JPanel selectPanel = new JPanel(); selectPanel.setLayout(new GridLayout(1,2)); selectPanel.add(selectGame); selectPanel.add(gameCombo); JPanel buttonPanel = new JPanel(); buttonPanel.setLayout(new GridLayout(1,3)); buttonPanel.add(addEntry); buttonPanel.add(editEntry); buttonPanel.add(removeEntry); JPanel exitPanel = new JPanel(); exitPanel.setLayout(new GridLayout(1,2)); exitPanel.add(gameCount); exitPanel.add(exitButton); Container pane = getContentPane(); pane.setLayout(new GridLayout(3,1)); pane.add(selectPanel); pane.add(buttonPanel); pane.add(exitPanel); addEntry.addActionListener(this); editEntry.addActionListener(this); removeEntry.addActionListener(this); exitButton.addActionListener(this); gameCombo.addActionListener(this); } public void actionPerformed(ActionEvent e) { if(e.getSource()==addEntry) addEntry(); if(e.getSource()==editEntry) editEntry(gamesList.get(selectedGame)); if(e.getSource()==removeEntry) { removeEntry(selectedGame); update(); } if(e.getSource()==exitButton) exitProg(); if(e.getSource()==gameCombo) { selectedGame = gameCombo.getSelectedIndex(); } if(e.getSource()==singleBox) singleBox.isSelected(); if(e.getSource()==coopBox) coopBox.isSelected(); if(e.getSource()==multiBox) multiBox.isSelected(); if(e.getSource()==cloudBox) cloudBox.isSelected(); if(e.getSource()==controllerBox) controllerBox.isSelected(); if(e.getSource()==achieveBox) achieveBox.isSelected(); if(e.getSource()==pcBox) pcBox.isSelected(); if(e.getSource()==addGame) { gamesList.add(new Game(titleText.getText(), singleBox.isSelected(), coopBox.isSelected(), multiBox.isSelected(), cloudBox.isSelected(), controllerBox.isSelected(), achieveBox.isSelected(), pcBox.isSelected())); titleList.add(titleText.getText()); addFrame.dispose(); update(); } if(e.getSource()==addCancel) addFrame.dispose(); if(e.getSource()==editCancel) editFrame.dispose(); if(e.getSource()==editGame) { gamesList.get(selectedGame).name = titleText.getText(); gamesList.get(selectedGame).single = singleBox.isSelected(); gamesList.get(selectedGame).coop = coopBox.isSelected(); gamesList.get(selectedGame).multi = multiBox.isSelected(); gamesList.get(selectedGame).cloud = cloudBox.isSelected(); gamesList.get(selectedGame).controller = controllerBox.isSelected(); gamesList.get(selectedGame).achieve = achieveBox.isSelected(); gamesList.get(selectedGame).pc = pcBox.isSelected(); titleList.remove(selectedGame); titleList.add(titleText.getText()); editFrame.dispose(); update(); } } public void update() { Collections.sort(titleList); Collections.sort(gamesList); gameCombo.updateUI(); titleText.setText(""); gameCombo.setSelectedIndex(-1); numGames = gamesList.size(); gameCount.setText("Number of games:"+numGames); } public void addEntry() { addFrame = new JFrame("Add Entry"); addFrame.setDefaultCloseOperation(EXIT_ON_CLOSE); addFrame.getContentPane(); addFrame.setLayout(new GridLayout(3,1)); singleBox = new JCheckBox("Single-Player"); singleBox.setSelected(false); coopBox = new JCheckBox("Coop"); coopBox.setSelected(false); multiBox = new JCheckBox("MultiPlayer"); multiBox.setSelected(false); cloudBox = new JCheckBox("Steam Cloud"); cloudBox.setSelected(false); controllerBox = new JCheckBox("Controller Support"); controllerBox.setSelected(false); achieveBox = new JCheckBox("Achievements"); achieveBox.setSelected(false); pcBox = new JCheckBox("For New PC"); pcBox.setSelected(false); addGame = new JButton("Add game"); addCancel = new JButton("Cancel"); JPanel titlePanel = new JPanel(); titlePanel.setLayout(new FlowLayout()); titlePanel.add(gameTitle); titlePanel.add(titleText); JPanel checkPanel = new JPanel(); checkPanel.setLayout(new FlowLayout()); checkPanel.add(singleBox); checkPanel.add(coopBox); checkPanel.add(multiBox); checkPanel.add(cloudBox); checkPanel.add(controllerBox); checkPanel.add(achieveBox); checkPanel.add(pcBox); JPanel buttonPanel = new JPanel(); buttonPanel.setLayout(new FlowLayout()); buttonPanel.add(addGame); buttonPanel.add(addCancel); addFrame.add(titlePanel); addFrame.add(checkPanel); addFrame.add(buttonPanel); singleBox.addActionListener(this); coopBox.addActionListener(this); multiBox.addActionListener(this); cloudBox.addActionListener(this); controllerBox.addActionListener(this); achieveBox.addActionListener(this); pcBox.addActionListener(this); addGame.addActionListener(this); addCancel.addActionListener(this); addFrame.pack(); addFrame.setVisible(true); } public void editEntry(Game g) { editFrame = new JFrame("Edit Entry"); editFrame.setDefaultCloseOperation(EXIT_ON_CLOSE); editFrame.getContentPane(); editFrame.setLayout(new GridLayout(3,1)); singleBox = new JCheckBox("Single-Player"); singleBox.setSelected(g.single); coopBox = new JCheckBox("Coop"); coopBox.setSelected(g.coop); multiBox = new JCheckBox("MultiPlayer"); multiBox.setSelected(g.multi); cloudBox = new JCheckBox("Steam Cloud"); cloudBox.setSelected(g.cloud); controllerBox = new JCheckBox("Controller Support"); controllerBox.setSelected(g.controller); achieveBox = new JCheckBox("Achievements"); achieveBox.setSelected(g.achieve); pcBox = new JCheckBox("For New PC"); pcBox.setSelected(g.pc); editGame = new JButton("Edit game"); editCancel = new JButton("Cancel"); titleText.setText(g.name); JPanel titlePanel = new JPanel(); titlePanel.setLayout(new FlowLayout()); titlePanel.add(gameTitle); titlePanel.add(titleText); JPanel checkPanel = new JPanel(); checkPanel.setLayout(new FlowLayout()); checkPanel.add(singleBox); checkPanel.add(coopBox); checkPanel.add(multiBox); checkPanel.add(cloudBox); checkPanel.add(controllerBox); checkPanel.add(achieveBox); checkPanel.add(pcBox); JPanel buttonPanel = new JPanel(); buttonPanel.setLayout(new FlowLayout()); buttonPanel.add(editGame); buttonPanel.add(editCancel); editFrame.add(titlePanel); editFrame.add(checkPanel); editFrame.add(buttonPanel); singleBox.addActionListener(this); coopBox.addActionListener(this); multiBox.addActionListener(this); cloudBox.addActionListener(this); controllerBox.addActionListener(this); achieveBox.addActionListener(this); pcBox.addActionListener(this); editGame.addActionListener(this); editCancel.addActionListener(this); editFrame.pack(); editFrame.setVisible(true); } public void removeEntry(int g) { Object[] options = {"Yes, remove the game", "No, keep the game"}; int n = JOptionPane.showOptionDialog(null, "Are you sure you want to remove this game from the list?", "Remove game?", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE, null, options, options[1]); if (n==0) { gamesList.remove(g); titleList.remove(g); } } public void exitProg() { try { PrintWriter out = new PrintWriter("games.txt"); out.flush(); for(int i=0;i<gamesList.size();i++) { out.print(gamesList.get(i).toString()); } out.close(); } catch (FileNotFoundException e) {} System.exit(0); } public static void main(String[] args) { SteamLibraryGUI frame = new SteamLibraryGUI(); frame.pack(); frame.setSize(600,200); frame.setVisible(true); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); Scanner in = new Scanner("games.txt"); while(in.hasNextLine()) { String line = in.nextLine(); String[] options = line.split("|"); Game g = new Game(options[0],Boolean.getBoolean(options[1]), Boolean.getBoolean(options[2]),Boolean.getBoolean(options[3]), Boolean.getBoolean(options[4]),Boolean.getBoolean(options[5]), Boolean.getBoolean(options[6]),Boolean.getBoolean(options[7])); frame.gamesList.add(g); frame.titleList.add(options[0]); System.out.println(g.toString()); } in.close(); }}\[/code\]There's also a Game class, but it's simply 1 String, and then 7 booleans.