gui
This commit is contained in:
parent
050c0233ad
commit
9bfe419ba3
9 changed files with 237 additions and 41 deletions
|
@ -9,8 +9,12 @@ import java.util.ArrayList;
|
||||||
public class FetchData {
|
public class FetchData {
|
||||||
|
|
||||||
private static ArrayList<String> levels = new ArrayList<String>();
|
private static ArrayList<String> levels = new ArrayList<String>();
|
||||||
|
private static int lock = 0;
|
||||||
|
|
||||||
public void getGithubString() throws IOException {
|
public void getGithubString() throws IOException {
|
||||||
|
|
||||||
|
if(lock == 0) {
|
||||||
|
lock = 1;
|
||||||
String link = "https://raw.githubusercontent.com/All-Rated-Extreme-Demon-List/AREDL/main/data/_list.json";
|
String link = "https://raw.githubusercontent.com/All-Rated-Extreme-Demon-List/AREDL/main/data/_list.json";
|
||||||
|
|
||||||
|
|
||||||
|
@ -31,6 +35,7 @@ public class FetchData {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public ArrayList<String> allLevels() {
|
public ArrayList<String> allLevels() {
|
||||||
return levels;
|
return levels;
|
||||||
|
|
|
@ -14,6 +14,14 @@ import org.json.JSONObject;
|
||||||
public class GuiData {
|
public class GuiData {
|
||||||
|
|
||||||
private ArrayList<String> localLevels = new ArrayList<String>();
|
private ArrayList<String> localLevels = new ArrayList<String>();
|
||||||
|
private ArrayList<String> completed = new ArrayList<String>();
|
||||||
|
private ArrayList<String> id = new ArrayList<String>();
|
||||||
|
|
||||||
|
|
||||||
|
public void setId(ArrayList<String> id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
private int localLength;
|
private int localLength;
|
||||||
|
|
||||||
public int getLocalLength() {
|
public int getLocalLength() {
|
||||||
|
@ -23,6 +31,16 @@ public class GuiData {
|
||||||
public ArrayList<String> getLocalLevels() {
|
public ArrayList<String> getLocalLevels() {
|
||||||
return localLevels;
|
return localLevels;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ArrayList<String> getCompleted() {
|
||||||
|
return completed;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArrayList<String> getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void IndexLevelName() throws IOException {
|
public void IndexLevelName() throws IOException {
|
||||||
|
|
||||||
|
@ -38,6 +56,9 @@ public class GuiData {
|
||||||
System.out.println(filelengthindex.length);
|
System.out.println(filelengthindex.length);
|
||||||
|
|
||||||
for(int i = 0; i < filelengthindex.length; i++) {
|
for(int i = 0; i < filelengthindex.length; i++) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
jsonstring = FileUtils.readFileToString(new File("C:\\ExtremeDemonList\\levels\\" + data.allLevels().get(i) + ".json"), StandardCharsets.UTF_8);
|
jsonstring = FileUtils.readFileToString(new File("C:\\ExtremeDemonList\\levels\\" + data.allLevels().get(i) + ".json"), StandardCharsets.UTF_8);
|
||||||
jsonstring = jsonstring.trim().replace("\n", "").replace("\t", "").replace("\\", "");
|
jsonstring = jsonstring.trim().replace("\n", "").replace("\t", "").replace("\\", "");
|
||||||
|
|
||||||
|
@ -45,7 +66,42 @@ public class GuiData {
|
||||||
|
|
||||||
localLevels.add(obj.getString("name"));
|
localLevels.add(obj.getString("name"));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void IndexLevelID() throws IOException {
|
||||||
|
|
||||||
|
FetchData data = new FetchData();
|
||||||
|
|
||||||
|
File filelength = new File("C:\\ExtremeDemonList\\levels");
|
||||||
|
File[] filelengthindex = filelength.listFiles();
|
||||||
|
|
||||||
|
String jsonstring;
|
||||||
|
|
||||||
|
localLength = filelengthindex.length;
|
||||||
|
|
||||||
|
System.out.println(filelengthindex.length);
|
||||||
|
|
||||||
|
for(int i = 0; i < filelengthindex.length; i++) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
jsonstring = FileUtils.readFileToString(new File("C:\\ExtremeDemonList\\levels\\" + data.allLevels().get(i) + ".json"), StandardCharsets.UTF_8);
|
||||||
|
jsonstring = jsonstring.trim().replace("\n", "").replace("\t", "").replace("\\", "");
|
||||||
|
|
||||||
|
JSONObject obj = new JSONObject(jsonstring);
|
||||||
|
|
||||||
|
id.add(obj.getInt("id") + "");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,6 +27,8 @@ public class ManageFiles {
|
||||||
|
|
||||||
fetch.getGithubString();
|
fetch.getGithubString();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
for(int i = 0; i < fetch.allLevels().size(); i++) {
|
for(int i = 0; i < fetch.allLevels().size(); i++) {
|
||||||
|
|
||||||
File file = new File("C:\\ExtremeDemonList\\levels\\" + fetch.allLevels().get(i) + ".json");
|
File file = new File("C:\\ExtremeDemonList\\levels\\" + fetch.allLevels().get(i) + ".json");
|
||||||
|
@ -39,14 +41,11 @@ public class ManageFiles {
|
||||||
}
|
}
|
||||||
|
|
||||||
if(missing > 0) {
|
if(missing > 0) {
|
||||||
|
|
||||||
gui.show(missinglevels, missing);
|
gui.show(missinglevels, missing);
|
||||||
} else {
|
} else {
|
||||||
MainGUI gui = new MainGUI();
|
MainGUI gui = new MainGUI();
|
||||||
gui.build();
|
gui.build();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public ArrayList<String> missingLevels() { // missinglevels wird zurückgegeben
|
|
||||||
return missinglevels;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,12 +7,16 @@ public class CreateFileStructure {
|
||||||
public void create() {
|
public void create() {
|
||||||
|
|
||||||
File file = new File("C:\\ExtremeDemonList\\levels");
|
File file = new File("C:\\ExtremeDemonList\\levels");
|
||||||
|
File file2 = new File("C:\\ExtremeDemonList\\completed");
|
||||||
|
|
||||||
if(!file.isDirectory()) {
|
if(!file.isDirectory()) {
|
||||||
System.out.println("nein");
|
|
||||||
file.mkdirs();
|
file.mkdirs();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!file2.isDirectory()) {
|
||||||
|
file2.mkdirs();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
31
src/gui/Elements.java
Normal file
31
src/gui/Elements.java
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
package gui;
|
||||||
|
|
||||||
|
import java.awt.Color;
|
||||||
|
|
||||||
|
import javax.swing.JPanel;
|
||||||
|
|
||||||
|
public class Elements {
|
||||||
|
|
||||||
|
private int lock = 0;
|
||||||
|
|
||||||
|
private JPanel panel = new JPanel();
|
||||||
|
|
||||||
|
public JPanel infopanel() {
|
||||||
|
|
||||||
|
if(lock == 0) {
|
||||||
|
lock = 1;
|
||||||
|
|
||||||
|
System.out.println("sdfadsf");
|
||||||
|
|
||||||
|
|
||||||
|
panel.setBackground(Color.LIGHT_GRAY);
|
||||||
|
panel.setLayout(null);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return panel;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -1,22 +1,39 @@
|
||||||
package gui;
|
package gui;
|
||||||
|
|
||||||
|
import java.awt.Button;
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
|
import java.awt.Component;
|
||||||
import java.awt.Dimension;
|
import java.awt.Dimension;
|
||||||
import java.awt.GridLayout;
|
import java.awt.GridLayout;
|
||||||
|
import java.awt.Insets;
|
||||||
|
import java.awt.Toolkit;
|
||||||
|
import java.awt.datatransfer.Clipboard;
|
||||||
|
import java.awt.datatransfer.StringSelection;
|
||||||
|
import java.awt.event.ActionEvent;
|
||||||
|
import java.awt.event.ActionListener;
|
||||||
|
import java.awt.event.ComponentEvent;
|
||||||
|
import java.awt.event.ComponentListener;
|
||||||
|
import java.awt.event.ItemEvent;
|
||||||
|
import java.awt.event.ItemListener;
|
||||||
import java.awt.event.KeyEvent;
|
import java.awt.event.KeyEvent;
|
||||||
import java.awt.event.KeyListener;
|
import java.awt.event.KeyListener;
|
||||||
import java.awt.event.MouseEvent;
|
import java.awt.event.MouseEvent;
|
||||||
import java.awt.event.MouseListener;
|
import java.awt.event.MouseListener;
|
||||||
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import javax.swing.BorderFactory;
|
import javax.swing.BorderFactory;
|
||||||
|
import javax.swing.JButton;
|
||||||
|
import javax.swing.JCheckBox;
|
||||||
import javax.swing.JFrame;
|
import javax.swing.JFrame;
|
||||||
import javax.swing.JLabel;
|
import javax.swing.JLabel;
|
||||||
import javax.swing.JPanel;
|
import javax.swing.JPanel;
|
||||||
import javax.swing.JProgressBar;
|
import javax.swing.JProgressBar;
|
||||||
import javax.swing.JScrollPane;
|
import javax.swing.JScrollPane;
|
||||||
import javax.swing.JTextField;
|
import javax.swing.JTextField;
|
||||||
|
import javax.swing.SwingConstants;
|
||||||
|
|
||||||
|
import data.FetchData;
|
||||||
import data.GuiData;
|
import data.GuiData;
|
||||||
|
|
||||||
public class MainGUI {
|
public class MainGUI {
|
||||||
|
@ -29,18 +46,29 @@ public class MainGUI {
|
||||||
public JScrollPane scroll = new JScrollPane(levelpanel);
|
public JScrollPane scroll = new JScrollPane(levelpanel);
|
||||||
public JTextField search = new JTextField();
|
public JTextField search = new JTextField();
|
||||||
public JLabel levelname;
|
public JLabel levelname;
|
||||||
|
public JLabel level = new JLabel("Liste");
|
||||||
|
public JCheckBox filtercompleted = new JCheckBox("Nach geschaft filtern");
|
||||||
|
public Button copyid = new Button("Level ID kopieren");
|
||||||
|
private FetchData fetch = new FetchData();
|
||||||
|
private Elements elements = new Elements();
|
||||||
|
|
||||||
|
|
||||||
public void build() throws IOException {
|
public void build() throws IOException {
|
||||||
|
|
||||||
GuiData data = new GuiData();
|
GuiData data = new GuiData();
|
||||||
data.IndexLevelName();
|
data.IndexLevelName();
|
||||||
|
data.IndexLevelID();
|
||||||
|
|
||||||
main.setSize(900, 700);
|
main.setSize(900, 700);
|
||||||
main.setLayout(null);
|
main.setLayout(null);
|
||||||
main.setResizable(false);
|
main.setResizable(false);
|
||||||
main.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
main.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||||
|
|
||||||
|
level.setBounds(10, 10, 200, 30);
|
||||||
|
level.setFont(level.getFont().deriveFont(20f));
|
||||||
|
|
||||||
|
filtercompleted.setBounds(720, 15, 200, 30);
|
||||||
|
|
||||||
progress.setBounds(200, 300, 500, 30);
|
progress.setBounds(200, 300, 500, 30);
|
||||||
progress.setStringPainted(true);
|
progress.setStringPainted(true);
|
||||||
progress.setMaximum(data.getLocalLength());
|
progress.setMaximum(data.getLocalLength());
|
||||||
|
@ -53,6 +81,7 @@ public class MainGUI {
|
||||||
levelpanel.setBorder(BorderFactory.createLineBorder(Color.BLACK));
|
levelpanel.setBorder(BorderFactory.createLineBorder(Color.BLACK));
|
||||||
levelpanel.setLayout(new GridLayout(data.getLocalLevels().size(), 1));
|
levelpanel.setLayout(new GridLayout(data.getLocalLevels().size(), 1));
|
||||||
|
|
||||||
|
copyid.setBounds(10, 50, 100, 30);
|
||||||
|
|
||||||
scroll.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
|
scroll.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
|
||||||
scroll.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
|
scroll.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
|
||||||
|
@ -60,27 +89,102 @@ public class MainGUI {
|
||||||
scroll.getVerticalScrollBar().setUnitIncrement(16);
|
scroll.getVerticalScrollBar().setUnitIncrement(16);
|
||||||
scroll.setVisible(false);
|
scroll.setVisible(false);
|
||||||
|
|
||||||
|
elements.infopanel().setBounds(700, 61, 184, 600);
|
||||||
|
elements.infopanel().setVisible(false);
|
||||||
|
|
||||||
search.setBounds(1, 1, 700, 60);
|
search.setBounds(1, 1, 700, 60);
|
||||||
|
|
||||||
Thread thread = new Thread(new Runnable() {
|
Thread thread = new Thread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
for(int i = 0; i < data.getLocalLevels().size(); i++) {
|
for(int i = 0; i < data.getLocalLevels().size(); i++) {
|
||||||
|
final int index = i;
|
||||||
progress.setValue(i + 1);
|
progress.setValue(i + 1);
|
||||||
|
|
||||||
currentLevel.setText(data.getLocalLevels().get(i));
|
currentLevel.setText(data.getLocalLevels().get(i));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
JPanel contents = new JPanel();
|
JPanel contents = new JPanel();
|
||||||
contents.setName(data.getLocalLevels().get(i));
|
contents.setName(data.getLocalLevels().get(i));
|
||||||
contents.setPreferredSize(new Dimension(600, 50));
|
contents.setPreferredSize(new Dimension(600, 50));
|
||||||
contents.setBorder(BorderFactory.createLineBorder(Color.LIGHT_GRAY));
|
contents.setBorder(BorderFactory.createLineBorder(Color.LIGHT_GRAY));
|
||||||
contents.setLayout(null);
|
contents.setLayout(null);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
JButton completed = new JButton("x");
|
||||||
|
completed.setBounds(640, 17, 17, 17);
|
||||||
|
completed.setMargin(new Insets(0,0,0,0));
|
||||||
|
|
||||||
|
JButton uncompleted = new JButton("\u2713");
|
||||||
|
uncompleted.setBounds(640, 17, 17, 17);
|
||||||
|
uncompleted.setMargin(new Insets(0,0,0,0));
|
||||||
|
|
||||||
|
File file = new File("C:\\ExtremeDemonList\\completed\\" + fetch.allLevels().get(i)+ ".json");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
completed.addActionListener(new ActionListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
contents.setBackground(Color.decode("#cbffbf"));
|
||||||
|
|
||||||
|
completed.setVisible(false);
|
||||||
|
uncompleted.setVisible(true);
|
||||||
|
|
||||||
|
try {
|
||||||
|
file.createNewFile();
|
||||||
|
} catch (IOException e1) {
|
||||||
|
// TODO Auto-generated catch block
|
||||||
|
e1.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
uncompleted.addActionListener(new ActionListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
contents.setBackground(Color.WHITE);
|
||||||
|
|
||||||
|
uncompleted.setVisible(false);
|
||||||
|
completed.setVisible(true);
|
||||||
|
|
||||||
|
file.delete();
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
if(new File("C:\\ExtremeDemonList\\completed\\" + fetch.allLevels().get(i)+ ".json").exists()) {
|
||||||
|
contents.setBackground(Color.decode("#cbffbf"));
|
||||||
|
uncompleted.setVisible(true);
|
||||||
|
completed.setVisible(false);
|
||||||
|
}
|
||||||
|
|
||||||
contents.addMouseListener(new MouseListener() {
|
contents.addMouseListener(new MouseListener() {
|
||||||
@Override
|
@Override
|
||||||
public void mouseClicked(MouseEvent e) {
|
public void mouseClicked(MouseEvent e) {
|
||||||
|
|
||||||
|
level.setText(data.getLocalLevels().get(index));
|
||||||
|
level.setVerticalAlignment(SwingConstants.CENTER);
|
||||||
|
|
||||||
|
copyid.addActionListener(new ActionListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
|
||||||
|
StringSelection stringSelection = new StringSelection(data.getId().get(index));
|
||||||
|
Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
|
||||||
|
clipboard.setContents(stringSelection, null);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public void mousePressed(MouseEvent e) {
|
public void mousePressed(MouseEvent e) {
|
||||||
|
@ -100,10 +204,9 @@ public class MainGUI {
|
||||||
|
|
||||||
levelname = new JLabel();
|
levelname = new JLabel();
|
||||||
levelname.setText(data.getLocalLevels().get(i));
|
levelname.setText(data.getLocalLevels().get(i));
|
||||||
levelname.setBounds(10, 10, 300, 30);
|
levelname.setBounds(290, 10, 300, 30);
|
||||||
|
|
||||||
search.addKeyListener(new KeyListener() {
|
search.addKeyListener(new KeyListener() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void keyTyped(KeyEvent e) {
|
public void keyTyped(KeyEvent e) {
|
||||||
if(!contents.getName().toLowerCase().contains(search.getText().toLowerCase())) {
|
if(!contents.getName().toLowerCase().contains(search.getText().toLowerCase())) {
|
||||||
|
@ -114,35 +217,44 @@ public class MainGUI {
|
||||||
levelpanel.add(contents);
|
levelpanel.add(contents);
|
||||||
levelpanel.repaint();
|
levelpanel.repaint();
|
||||||
levelpanel.revalidate();
|
levelpanel.revalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void keyPressed(KeyEvent e) {
|
public void keyPressed(KeyEvent e) {
|
||||||
// TODO Auto-generated method stub
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void keyReleased(KeyEvent e) {
|
public void keyReleased(KeyEvent e) {
|
||||||
// TODO Auto-generated method stub
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
filtercompleted.addItemListener(new ItemListener() {
|
||||||
|
@Override
|
||||||
|
public void itemStateChanged(ItemEvent e) {
|
||||||
|
if (e.getStateChange() == ItemEvent.SELECTED) {
|
||||||
|
if (!contents.getBackground().equals(Color.decode("#cbffbf"))) {
|
||||||
|
levelpanel.remove(contents);
|
||||||
|
}
|
||||||
|
} else if (e.getStateChange() == ItemEvent.DESELECTED) {
|
||||||
|
levelpanel.add(contents, 0); // Füge das Element am Anfang hinzu
|
||||||
|
}
|
||||||
|
levelpanel.repaint();
|
||||||
|
levelpanel.revalidate();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
JLabel rank = new JLabel("#" + (i + 1));
|
JLabel rank = new JLabel("#" + (i + 1));
|
||||||
rank.setBounds(640, 10, 40, 30);
|
rank.setBounds(10, 10, 40, 30);
|
||||||
|
|
||||||
contents.add(levelname);
|
contents.add(levelname);
|
||||||
contents.add(rank);
|
contents.add(rank);
|
||||||
|
contents.add(completed);
|
||||||
|
contents.add(uncompleted);
|
||||||
levelpanel.add(contents);
|
levelpanel.add(contents);
|
||||||
|
|
||||||
}
|
}
|
||||||
scroll.setVisible(true);
|
scroll.setVisible(true);
|
||||||
|
elements.infopanel().setVisible(true);
|
||||||
progress.setVisible(false);
|
progress.setVisible(false);
|
||||||
info.setVisible(false);
|
info.setVisible(false);
|
||||||
currentLevel.setVisible(false);
|
currentLevel.setVisible(false);
|
||||||
|
@ -150,7 +262,9 @@ public class MainGUI {
|
||||||
|
|
||||||
});
|
});
|
||||||
thread.start();
|
thread.start();
|
||||||
|
|
||||||
|
elements.infopanel().add(copyid);
|
||||||
|
elements.infopanel().add(level, SwingConstants.CENTER);
|
||||||
|
|
||||||
|
|
||||||
main.add(search);
|
main.add(search);
|
||||||
|
@ -158,6 +272,8 @@ public class MainGUI {
|
||||||
main.add(info);
|
main.add(info);
|
||||||
main.add(scroll);
|
main.add(scroll);
|
||||||
main.add(progress);
|
main.add(progress);
|
||||||
|
main.add(filtercompleted);
|
||||||
|
main.add(elements.infopanel());
|
||||||
main.setVisible(true);
|
main.setVisible(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,6 +51,8 @@ public class MissingLevels {
|
||||||
scroll.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
|
scroll.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
|
||||||
scroll.setBounds(1, 60, 383, 201);
|
scroll.setBounds(1, 60, 383, 201);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
for(int i = 0; i < missinglevels.size(); i++) {
|
for(int i = 0; i < missinglevels.size(); i++) {
|
||||||
area.append(missinglevels.get(i) + "\n");
|
area.append(missinglevels.get(i) + "\n");
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,18 +0,0 @@
|
||||||
package gui;
|
|
||||||
|
|
||||||
import java.awt.event.KeyAdapter;
|
|
||||||
import java.awt.event.KeyEvent;
|
|
||||||
|
|
||||||
import javax.swing.JTextField;
|
|
||||||
|
|
||||||
public class SearchEngine {
|
|
||||||
|
|
||||||
MainGUI gui = new MainGUI();
|
|
||||||
|
|
||||||
JTextField searchbar = gui.search;
|
|
||||||
|
|
||||||
public void Filter(String query) {
|
|
||||||
System.out.println(query);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -8,4 +8,5 @@
|
||||||
requires java.desktop;
|
requires java.desktop;
|
||||||
requires json;
|
requires json;
|
||||||
requires org.apache.commons.io;
|
requires org.apache.commons.io;
|
||||||
|
requires java.datatransfer;
|
||||||
}
|
}
|
Loading…
Reference in a new issue