Lab6 finished+
This commit is contained in:
parent
7491ceaca0
commit
cf238cb347
@ -48,7 +48,6 @@ public class PlaneGenericStorage {
|
||||
public boolean LoadData(File f) throws FileNotFoundException {
|
||||
if(!f.exists())
|
||||
return false;
|
||||
System.out.println("Gay");
|
||||
StringBuilder bufferTextFromFile =new StringBuilder();
|
||||
Scanner s = new Scanner(f);
|
||||
while(s.hasNext())
|
||||
|
@ -136,6 +136,7 @@ public class FramePlaneCollection extends JFrame {
|
||||
private void saveFile_Click(){
|
||||
JFileChooser fc = new JFileChooser("C:\\Users\\123\\Desktop");
|
||||
fc.addChoosableFileFilter(new TxtSaveFilter());
|
||||
fc.addChoosableFileFilter(new TxtSaveFilter());
|
||||
int retrieval = fc.showSaveDialog(null);
|
||||
|
||||
if (retrieval == JFileChooser.APPROVE_OPTION) {
|
||||
@ -150,6 +151,7 @@ public class FramePlaneCollection extends JFrame {
|
||||
}
|
||||
private void loadFile_Click() {
|
||||
JFileChooser fc = new JFileChooser("C:\\Users\\123\\Desktop");
|
||||
fc.addChoosableFileFilter(new TxtSaveFilter());
|
||||
int ret = fc.showDialog(null, "Открыть файл");
|
||||
if(ret == JFileChooser.APPROVE_OPTION){
|
||||
File file = fc.getSelectedFile();
|
||||
@ -186,6 +188,7 @@ public class FramePlaneCollection extends JFrame {
|
||||
|
||||
private void loadCollection_Click() {
|
||||
JFileChooser fc = new JFileChooser("C:\\Users\\123\\Desktop");
|
||||
fc.addChoosableFileFilter(new TxtSaveFilter());
|
||||
int ret = fc.showDialog(null, "Открыть файл");
|
||||
if(ret == JFileChooser.APPROVE_OPTION){
|
||||
File file = fc.getSelectedFile();
|
||||
|
Loading…
Reference in New Issue
Block a user