Fixed Dropdowns using raw class and possibly returning null

This commit is contained in:
2022-04-05 21:46:14 -04:00
parent aa4a911f0b
commit 5869805980
6 changed files with 64 additions and 7 deletions

View File

@@ -66,7 +66,7 @@ public class FirstLoginGui extends JFrame {
loaderLabel.setBounds(10, 140, 84, 31);
contentPane.add(loaderLabel);
JComboBox loaderDropdown = new JComboBox(LoaderUtils.loaders);
JComboBox<String> loaderDropdown = new JComboBox<>(LoaderUtils.getLoaders());
loaderDropdown.setBounds(94, 144, 231, 23);
contentPane.add(loaderDropdown);

View File

@@ -69,7 +69,7 @@ public class NewProfileGui extends JFrame {
loaderLabel.setBounds(10, 140, 84, 31);
contentPane.add(loaderLabel);
JComboBox loaderDropdown = new JComboBox(LoaderUtils.loaders);
JComboBox<String> loaderDropdown = new JComboBox<>(LoaderUtils.getLoaders());
loaderDropdown.setBounds(94, 144, 231, 23);
contentPane.add(loaderDropdown);

View File

@@ -62,7 +62,6 @@ public class StartupGui extends JFrame {
makeDirs();
smoothIncrease(progressBar, 20);
currentTaskLabel.setText("Loading Config...");
currentTaskLabel.repaint();
Config.loadConfig();
smoothIncrease(progressBar, 40);
currentTaskLabel.setText("Loading Profiles...");

View File

@@ -13,7 +13,6 @@ import java.net.URL;
import java.nio.charset.StandardCharsets;
public class LoaderUtils {
public static String[] loaders;
public static String[] getLoaders() {
try {
@@ -28,7 +27,6 @@ public class LoaderUtils {
loadersArrayList[i] = loadersArray[i].getId();
}
loaders = loadersArrayList;
return loadersArrayList;
} catch (IOException e) {