diff --git a/src/frames/FrameShipsCollection.java b/src/frames/FrameShipsCollection.java index 42ca9b1..8db0fc3 100644 --- a/src/frames/FrameShipsCollection.java +++ b/src/frames/FrameShipsCollection.java @@ -258,6 +258,7 @@ public class FrameShipsCollection extends JFrame { } private void loadFile(){ JFileChooser fc = new JFileChooser("C:\\Users\\user\\Documents"); + fc.addChoosableFileFilter(new TxtFilter()); int ret = fc.showDialog(null, "Открыть файл"); if(ret == JFileChooser.APPROVE_OPTION){ File file = fc.getSelectedFile(); @@ -273,6 +274,7 @@ public class FrameShipsCollection extends JFrame { private void loadSet(){ JFileChooser fc = new JFileChooser("C:\\Users\\user\\Documents"); int ret = fc.showDialog(null, "Открыть файл"); + fc.addChoosableFileFilter(new TxtFilter()); if(ret == JFileChooser.APPROVE_OPTION){ File file = fc.getSelectedFile(); try {