lab6 some minor fixes
This commit is contained in:
parent
3047272489
commit
a8d164c663
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user