December 20, 20178 yr Hi, I am very stuck on how to implement a GUI, any help would be greatly appreciated. All the GUI needs to be is very simple: Take in armour type, food type and token value. Then pass this into the original java file above. I however, have no idea what i'm doing. Below is my attempt, i'd be really grateful if someone would be able to have a look and fix it or atleast point me in the right direction. Many thanks import javax.swing.JButton; import javax.swing.JCheckBox; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JSlider; import javax.swing.JTextField; public class GuiSetup { private final JFrame jFrame; /* private JLabel armourType; private JLabel foodLabel; private JLabel tokenAmount; private JTextField foodName; private JTextField tokenName; private JTextField TokenAmount; */ public GuiSetup() { jFrame = new JFrame("WarriorGuild Tokens"); JPanel mainPanel = new JPanel(); JLabel armourType; JLabel foodLabel; JLabel tokenAmounta; JTextField food; JTextField armourName; JTextField tokenAmount; } /* public static String getFoodName() { return foodName; } public static String getArmourName() { return armourName; } public static String getTokenAmount() { return tokenAmount; } */ }
December 20, 20178 yr @scriptersteve Follow some Java Swing Tutorials, there are plenty online. No one is going to make your GUI for you Edited December 20, 20178 yr by Explv
December 20, 20178 yr Tutorials are online, there are plenty of them!! Your best bet is probably to extend JFrame and work from there. GL! Apa
December 20, 20178 yr 20 minutes ago, HeyImJamie said: Having a name like scriptersteve and not having a clue on how to script It's a kind of name you grow into.
December 20, 20178 yr 8 minutes ago, Chikan said: It's a kind of name you grow into. Then call me big dick Jamie
December 20, 20178 yr Author thanks, i'll look into it more and yeah i have absolutely no idea lol. It was more of let's aim for it :')
Create an account or sign in to comment