started implementing ApplicationFrame.init() -- further work needed

This commit is contained in:
Kjistóf 2016-05-07 15:15:44 +02:00
parent c157981253
commit 536081b015

View File

@ -1,14 +1,36 @@
package cicaprojekt; package cicaprojekt;
import javax.swing.*; import javax.swing.*;
import javax.swing.filechooser.FileNameExtensionFilter;
import javax.swing.plaf.basic.BasicInternalFrameTitlePane;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
public class ApplicationFrame implements Runnable public class ApplicationFrame implements Runnable
{ {
private JFrame jframe; private JFrame jframe;
private JPanel mapselectorpanel;
private JPanel gamepanel;
public ApplicationFrame(){ public ApplicationFrame(){}
public void init(){
jframe = new JFrame(); jframe = new JFrame();
mapselectorpanel = new JPanel();
List<File> dungeons = new ArrayList<>();
File dir = new File(System.getProperty("user.dir"));
FileNameExtensionFilter filter = new FileNameExtensionFilter("dungeon");
for (File f : dir.listFiles()) {
if (filter.accept(f)){
dungeons.add(f);
}
}
//TODO create a JTable and put it into mapselectorpanel
} }
@Override @Override