implement file open
This commit is contained in:
parent
96ac4be243
commit
7ac64265ba
@ -6,6 +6,8 @@
|
|||||||
|
|
||||||
package kontakte;
|
package kontakte;
|
||||||
|
|
||||||
|
import kontakte.controller.Controller;
|
||||||
|
import kontakte.model.Model;
|
||||||
import kontakte.view.View;
|
import kontakte.view.View;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -17,6 +19,10 @@ public class Main
|
|||||||
public Main()
|
public Main()
|
||||||
{
|
{
|
||||||
View v = new View();
|
View v = new View();
|
||||||
|
Model m = new Model();
|
||||||
|
Controller c = new Controller(v, m);
|
||||||
|
c.registerEvents();
|
||||||
|
c.registerCommands();
|
||||||
v.setVisible(true);
|
v.setVisible(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,6 +27,9 @@ public class CommandOpen implements CommandInterface
|
|||||||
@Override
|
@Override
|
||||||
public void execute()
|
public void execute()
|
||||||
{
|
{
|
||||||
|
view.getFileChooser().showOpenDialog(view);
|
||||||
|
String fileAdd = view.getFileChooser().getSelectedFile().getAbsolutePath();
|
||||||
|
view.getTextFileAdress().setText(fileAdd);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
x
Reference in New Issue
Block a user