Here is a way to fill a JComboBox with strings from a file, using some of the classes introduced in Java 7 in the nio packages. Of course, it could be made to work for JList too. The significant thing here is that we want to use the classloader to locate the resource  with getResource, whilst needing the Path object in order to pass it to Files.readAllLines. This feels a little more tortuous than it ought to be and some could be forgiven for thinking the 'old ways' are better. The source is HERE.

import java.awt.Container;

import java.net.URL;

import java.nio.charset.Charset;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;

import java.util.Vector;

import javax.swing.ComboBoxModel;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JFrame;
import javax.swing.JList;
import javax.swing.SwingUtilities;


public class AllLinesGetter extends JFrame {
    private void setGui() {
        try {
            setLocation(0, 100);
            setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

            Container cp = getContentPane();
            cp.add(new JList(getStringModel("/x.txt")));
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public ComboBoxModel<String> getStringModel(String resourcePath) {
        ComboBoxModel<String> result = null;

        try {
            URL u = getClass().getResource(resourcePath);
            Path p = Paths.get(u.toURI());
            java.util.List<String> lines = Files.readAllLines(p,
                    Charset.forName("UTF-8"));
            result = new DefaultComboBoxModel<String>(new Vector<String>(lines));
        } catch (Exception e) {
            e.printStackTrace();
        }

        return result;
    }

    public static void main(String[] args) {
        try {
            SwingUtilities.invokeAndWait(new Runnable() {
                    public void run() {
                        AllLinesGetter f = new AllLinesGetter();
                        f.setGui();
                        f.pack();
                        f.setVisible(true);
                    }
                });
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}