Commit 77e6b6e6 authored by superblaubeere27's avatar superblaubeere27

Add UI for Custom mods and update README.md

parent c6cdc7c6
# LiquidLauncher
#### This is the repository for the optional launcher for LiquidBounce.
**What is LiquidLauncher?**
##### What is LiquidLauncher?
LiquidLauncher allows you to download and automatically install any version of LiquidBounce, a hacked client for Minecraft 1.8.9. It also makes keeping the client up-to-date very easy.
**But why should I trust you? It could be infected, couldn't it?**
##### But why should I trust you? It could be infected, couldn't it?
Well, as you can see, LiquidLauncher is open-source. That means anyone can look through the code and search for malicious code.
**But who guarantees that you're using the same code in the actual launcher?**
##### But who guarantees that you're using the same code in the actual launcher?
The actual .jar file isn't obfuscated. Just use a decompiler like [JD-GUI](http://jd.benow.ca) to see its source.
\ No newline at end of file
The actual .jar file isn't obfuscated. Just use a decompiler like [JD-GUI](http://jd.benow.ca) to see its source.
##### Build it yourself
Just execute maven with the target **package**
`mvn package`
......@@ -8,7 +8,9 @@ import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import net.ccbluex.LiquidLauncher.config.Settings;
import net.ccbluex.LiquidLauncher.launch.*;
import net.ccbluex.LiquidLauncher.launch.mods.Mod;
import net.ccbluex.LiquidLauncher.ui.AddLiquidBounceDialog;
import net.ccbluex.LiquidLauncher.ui.ConfigureModsForm;
import net.ccbluex.LiquidLauncher.ui.MenuInterface;
import net.ccbluex.LiquidLauncher.utils.*;
......@@ -23,6 +25,7 @@ import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.List;
import java.util.logging.Handler;
import java.util.logging.Level;
......@@ -84,11 +87,13 @@ public class LiquidLauncher {
}
public final JsonParser jsonParser = new JsonParser();
public HashMap<String, List<Mod>> versionMods = new HashMap<>();
public File minecraftDirectory;
public File launcherDirectory;
public List<ClientBuild> clientBuilds;
public AssetManager assetManager;
public AuthenticationUtils.AuthenticationResponse account = AuthenticationUtils.login("CrackedUser");
public ImageIcon icon;
private URL versionsUrl;
public LiquidLauncher() throws MalformedURLException {
......@@ -127,7 +132,8 @@ public class LiquidLauncher {
JLabel statusLabel = new JLabel("");
startScreen.add(BorderLayout.SOUTH, statusLabel);
try {
startScreen.setIconImage(ImageIO.read(LiquidLauncher.class.getResourceAsStream("/icon.png")));
icon = new ImageIcon(ImageIO.read(LiquidLauncher.class.getResourceAsStream("/icon.png")));
startScreen.setIconImage(icon.getImage());
} catch (Exception e) {
LOGGER.severe("Failed to read icon image");
}
......@@ -203,6 +209,10 @@ public class LiquidLauncher {
}
fatalError("Failed to load LiquidBounce versions: " + e);
}
for (String s :
getMinecraftVersions()) {
versionMods.put(s, new ArrayList<>());
}
statusLabel.setText("Checking for updates...");
checkForUpdate();
Runtime.getRuntime().addShutdownHook(new Thread(LiquidLauncher::stop));
......@@ -442,8 +452,22 @@ public class LiquidLauncher {
}
}
}
if (files != null) {
for (File f :
files) {
if (f.getName().equals("java")) {
return f.getPath();
}
}
}
// File path = new File();
JOptionPane.showMessageDialog(menuInterface, "Failed to find the launcher JRE", "Warning", JOptionPane.WARNING_MESSAGE);
return "java";
}
public void showModDialog(String mcVersion) {
ConfigureModsForm form = new ConfigureModsForm(mcVersion);
form.model.mods = versionMods.get(mcVersion);
form.setVisible(true);
}
}
package net.ccbluex.LiquidLauncher.launch.mods;
/**
* Copyright © 2015 - 2017 | CCBlueX | All rights reserved.
* <p>
* Exrief - $ By CCBlueX(superblaubeere27)
*/
public class Mod {
private String name;
private String path;
private boolean activated;
public Mod(String name, String path, boolean activated) {
this.name = name;
this.path = path;
this.activated = activated;
}
@Override
public String toString() {
return "Mod{" +
"name='" + name + '\'' +
", path='" + path + '\'' +
", activated=" + activated +
'}';
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getPath() {
return path;
}
public boolean isActivated() {
return activated;
}
public void setActivated(boolean activated) {
this.activated = activated;
}
}
package net.ccbluex.LiquidLauncher.launch.mods;
import javax.swing.event.TableModelEvent;
import javax.swing.event.TableModelListener;
import javax.swing.table.AbstractTableModel;
import java.util.ArrayList;
import java.util.List;
/**
* Copyright © 2015 - 2017 | CCBlueX | All rights reserved.
* <p>
* Exrief - $ By CCBlueX(superblaubeere27)
*/
public class ModsTableModel extends AbstractTableModel implements TableModelListener {
private static final String[] COLUMN_NAMES = {"Activated", "Name", "Path"};
private static final boolean[] COLUMN_EDITABLE = {true, true, false};
private static final Class<?>[] COLUMN_CLASSES = {Boolean.class, String.class, String.class};
public List<Mod> mods = new ArrayList<>();
public ModsTableModel() {
addTableModelListener(this);
}
/**
* Returns the number of rows in the model. A
* <code>JTable</code> uses this method to determine how many rows it
* should display. This method should be quick, as it
* is called frequently during rendering.
*
* @return the number of rows in the model
* @see #getColumnCount
*/
@Override
public int getRowCount() {
return mods.size();
}
/**
* Returns the number of columns in the model. A
* <code>JTable</code> uses this method to determine how many columns it
* should create and display by default.
*
* @return the number of columns in the model
* @see #getRowCount
*/
@Override
public int getColumnCount() {
return COLUMN_NAMES.length;
}
/**
* Returns the value for the cell at <code>columnIndex</code> and
* <code>rowIndex</code>.
*
* @param rowIndex the row whose value is to be queried
* @param columnIndex the column whose value is to be queried
* @return the value Object at the specified cell
*/
@Override
public Object getValueAt(int rowIndex, int columnIndex) {
Mod mod = mods.get(rowIndex);
switch (columnIndex) {
case 0:
return mod.isActivated();
case 1:
return mod.getName();
case 2:
return mod.getPath();
}
return "ERR";
}
/**
* Returns a default name for the column using spreadsheet conventions:
* A, B, C, ... Z, AA, AB, etc. If <code>column</code> cannot be found,
* returns an empty string.
*
* @param column the column being queried
* @return a string containing the default name of <code>column</code>
*/
@Override
public String getColumnName(int column) {
return COLUMN_NAMES[column];
}
/**
* Returns <code>Object.class</code> regardless of <code>columnIndex</code>.
*
* @param columnIndex the column being queried
* @return the Object.class
*/
@Override
public Class<?> getColumnClass(int columnIndex) {
return COLUMN_CLASSES[columnIndex];
}
/**
* Returns false. This is the default implementation for all cells.
*
* @param rowIndex the row being queried
* @param columnIndex the column being queried
* @return false
*/
@Override
public boolean isCellEditable(int rowIndex, int columnIndex) {
return COLUMN_EDITABLE[columnIndex];
}
@Override
public void setValueAt(Object aValue, int rowIndex, int columnIndex) {
Mod mod = mods.get(rowIndex);
switch (columnIndex) {
case 0:
mod.setActivated((Boolean) aValue);
case 1:
mod.setName(aValue.toString());
}
}
/**
* This fine grain notification tells listeners the exact range
* of cells, rows, or columns that changed.
*
* @param e
*/
@Override
public void tableChanged(TableModelEvent e) {
if (e.getType() == TableModelEvent.DELETE) {
if (e.getColumn() == TableModelEvent.ALL_COLUMNS) {
mods.clear();
} else {
for (int i = e.getFirstRow(); i < e.getLastRow(); i++) {
mods.remove(i);
}
}
}
}
}
<?xml version="1.0" encoding="UTF-8"?>
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="net.ccbluex.LiquidLauncher.ui.AddLiquidBounceDialog">
<grid id="cbd77" binding="contentPane" layout-manager="GridLayoutManager" row-count="2" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<grid id="cbd77" binding="contentPane" layout-manager="GridLayoutManager" row-count="3" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="10" left="10" bottom="10" right="10"/>
<constraints>
<xy x="48" y="54" width="930" height="297"/>
......@@ -11,7 +11,7 @@
<grid id="94766" layout-manager="GridLayoutManager" row-count="1" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="1" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="1" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
<border type="none"/>
......@@ -52,7 +52,7 @@
<grid id="e3588" layout-manager="GridLayoutManager" row-count="4" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
<border type="none"/>
......@@ -99,6 +99,15 @@
</component>
</children>
</grid>
<component id="91fde" class="javax.swing.JLabel">
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="0" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<font size="48"/>
<text value="Add LiquidBounce"/>
</properties>
</component>
</children>
</grid>
</form>
......@@ -41,6 +41,8 @@ public class AddLiquidBounceDialog extends JDialog {
}
public AddLiquidBounceDialog(final String downloadLink, final String hash) {
setAlwaysOnTop(true);
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
this.hash = hash;
setContentPane(contentPane);
setModal(true);
......@@ -201,10 +203,10 @@ public class AddLiquidBounceDialog extends JDialog {
*/
private void $$$setupUI$$$() {
contentPane = new JPanel();
contentPane.setLayout(new GridLayoutManager(2, 1, new Insets(10, 10, 10, 10), -1, -1));
contentPane.setLayout(new GridLayoutManager(3, 1, new Insets(10, 10, 10, 10), -1, -1));
final JPanel panel1 = new JPanel();
panel1.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
contentPane.add(panel1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1, null, null, null, 0, false));
contentPane.add(panel1, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1, null, null, null, 0, false));
final Spacer spacer1 = new Spacer();
panel1.add(spacer1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));
final JPanel panel2 = new JPanel();
......@@ -218,7 +220,7 @@ public class AddLiquidBounceDialog extends JDialog {
panel2.add(buttonCancel, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
final JPanel panel3 = new JPanel();
panel3.setLayout(new GridLayoutManager(4, 2, new Insets(0, 0, 0, 0), -1, -1));
contentPane.add(panel3, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
contentPane.add(panel3, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
dlLabel = new JLabel();
dlLabel.setText("<html>Please download LiquidBounce from the download page: <input value=\"%download%\"></input> Please do <strong>NOT</strong> extract the zip file!</html>");
dlLabel.putClientProperty("html.disable", Boolean.FALSE);
......@@ -233,6 +235,10 @@ public class AddLiquidBounceDialog extends JDialog {
final JLabel label1 = new JLabel();
label1.setText("Or drag and drop the file into this frame");
panel3.add(label1, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
final JLabel label2 = new JLabel();
label2.setFont(new Font(label2.getFont().getName(), label2.getFont().getStyle(), 48));
label2.setText("Add LiquidBounce");
contentPane.add(label2, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
}
/**
......
<?xml version="1.0" encoding="UTF-8"?>
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="net.ccbluex.LiquidLauncher.ui.AddModDialog">
<grid id="cbd77" binding="contentPane" layout-manager="GridLayoutManager" row-count="2" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="10" left="10" bottom="10" right="10"/>
<constraints>
<xy x="48" y="54" width="436" height="297"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<grid id="94766" layout-manager="GridLayoutManager" row-count="1" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="1" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<hspacer id="98af6">
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
</hspacer>
<grid id="9538f" layout-manager="GridLayoutManager" row-count="1" column-count="2" same-size-horizontally="true" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<component id="e7465" class="javax.swing.JButton" binding="buttonOK">
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="OK"/>
</properties>
</component>
<component id="5723f" class="javax.swing.JButton" binding="buttonCancel">
<constraints>
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="Cancel"/>
</properties>
</component>
</children>
</grid>
</children>
</grid>
<grid id="e3588" layout-manager="GridLayoutManager" row-count="4" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<vspacer id="678a5">
<constraints>
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
</constraints>
</vspacer>
<component id="b2ea5" class="javax.swing.JLabel">
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="0" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<font size="48"/>
<text value="Add Mod"/>
</properties>
</component>
<component id="8680b" class="javax.swing.JTextField" binding="modPath" default-binding="true">
<constraints>
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
<preferred-size width="150" height="-1"/>
</grid>
</constraints>
<properties/>
</component>
<component id="bafbf" class="javax.swing.JLabel">
<constraints>
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="Mod JAR:"/>
</properties>
</component>
<component id="efae" class="javax.swing.JButton" binding="browseButton" default-binding="true">
<constraints>
<grid row="2" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="Browse"/>
</properties>
</component>
</children>
</grid>
</children>
</grid>
</form>
package net.ccbluex.LiquidLauncher.ui;
import com.intellij.uiDesigner.core.GridConstraints;
import com.intellij.uiDesigner.core.GridLayoutManager;
import com.intellij.uiDesigner.core.Spacer;
import net.ccbluex.LiquidLauncher.LiquidLauncher;
import net.ccbluex.LiquidLauncher.launch.mods.Mod;
import net.ccbluex.LiquidLauncher.utils.Utils;
import javax.swing.*;
import java.awt.*;
import java.awt.event.KeyEvent;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.io.File;
public class AddModDialog extends JDialog {
private JPanel contentPane;
private JButton buttonOK;
private JButton buttonCancel;
private JTextField modPath;
private JButton browseButton;
private ConfigureModsForm modsForm;
{
// GUI initializer generated by IntelliJ IDEA GUI Designer
// >>> IMPORTANT!! <<<
// DO NOT EDIT OR ADD ANY CODE HERE!
$$$setupUI$$$();
}
public AddModDialog(ConfigureModsForm modsForm) {
setAlwaysOnTop(true);
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
setLocationRelativeTo(null);
this.modsForm = modsForm;
setContentPane(contentPane);
setModal(true);
getRootPane().setDefaultButton(buttonOK);
buttonOK.addActionListener(e -> onOK());
buttonCancel.addActionListener(e -> onCancel());
// call onCancel() when cross is clicked
setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
onCancel();
}
});
// call onCancel() on ESCAPE
contentPane.registerKeyboardAction(e -> onCancel(), KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
browseButton.addActionListener(e -> {
String f = Utils.chooseFile(LiquidLauncher.liquidLauncher.minecraftDirectory, LiquidLauncher.liquidLauncher.menuInterface);
if (f != null) {
modPath.setText(f);
}
});
pack();
}
private void onOK() {
if (!new File(modPath.getText()).exists()) {
JOptionPane.showMessageDialog(this, "The file " + modPath.getText() + " does not exist", "Error", JOptionPane.ERROR_MESSAGE);
return;
}
String fileName = new File(modPath.getText()).getName();
if (!fileName.toLowerCase().endsWith(".jar")) {
int i = JOptionPane.showOptionDialog(this, "The file is not a Jar file\nDo you want to add it anyway?", "Warning", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE, LiquidLauncher.liquidLauncher.icon, new String[]{"Ignore", "Cancel"}, null);
if (i != JOptionPane.OK_OPTION) {
return;
}
}
modsForm.addMod(new Mod(fileName.substring(0, fileName.lastIndexOf(".")), modPath.getText(), true));
dispose();
}
private void onCancel() {
// add your code here if necessary
dispose();
}
/**
* Method generated by IntelliJ IDEA GUI Designer
* >>> IMPORTANT!! <<<
* DO NOT edit this method OR call it in your code!
*
* @noinspection ALL
*/
private void $$$setupUI$$$() {
contentPane = new JPanel();
contentPane.setLayout(new GridLayoutManager(2, 1, new Insets(10, 10, 10, 10), -1, -1));
final JPanel panel1 = new JPanel();
panel1.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
contentPane.add(panel1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1, null, null, null, 0, false));
final Spacer spacer1 = new Spacer();
panel1.add(spacer1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));
final JPanel panel2 = new JPanel();
panel2.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1, true, false));
panel1.add(panel2, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
buttonOK = new JButton();
buttonOK.setText("OK");
panel2.add(buttonOK, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
buttonCancel = new JButton();
buttonCancel.setText("Cancel");
panel2.add(buttonCancel, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
final JPanel panel3 = new JPanel();
panel3.setLayout(new GridLayoutManager(4, 2, new Insets(0, 0, 0, 0), -1, -1));
contentPane.add(panel3, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
final Spacer spacer2 = new Spacer();
panel3.add(spacer2, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
final JLabel label1 = new JLabel();
label1.setFont(new Font(label1.getFont().getName(), label1.getFont().getStyle(), 48));
label1.setText("Add Mod");
panel3.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
modPath = new JTextField();
panel3.add(modPath, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
final JLabel label2 = new JLabel();
label2.setText("Mod JAR:");
panel3.add(label2, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
browseButton = new JButton();
browseButton.setText("Browse");
panel3.add(browseButton, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
}
/**
* @noinspection ALL
*/
public JComponent $$$getRootComponent$$$() {
return contentPane;
}
}
<?xml version="1.0" encoding="UTF-8"?>
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="net.ccbluex.LiquidLauncher.ui.ConfigureModsForm">
<grid id="27dc6" binding="panel1" default-binding="true" layout-manager="GridLayoutManager" row-count="4" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<xy x="20" y="20" width="550" height="400"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<component id="f0ffa" class="javax.swing.JTable" binding="modsTable" default-binding="true">
<constraints>
<grid row="1" column="0" row-span="2" col-span="1" vsize-policy="6" hsize-policy="6" anchor="0" fill="3" indent="0" use-parent-layout="false">
<preferred-size width="150" height="50"/>
</grid>
</constraints>
<properties/>
</component>
<component id="ba7b0" class="javax.swing.JLabel">
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="0" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<font size="48" style="0"/>
<text value="Configure mods"/>
</properties>
</component>
<component id="9440f" class="javax.swing.JButton" binding="okButton" default-binding="true">
<constraints>
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="Ok"/>
</properties>
</component>
<component id="fddf6" class="javax.swing.JButton" binding="cancelButton" default-binding="true">
<constraints>
<grid row="3" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="Cancel"/>
</properties>
</component>
<grid id="87f08" binding="buttonList" layout-manager="GridBagLayout">
<constraints>
<grid row="1" column="1" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<component id="94393" class="javax.swing.JButton" binding=