scriptersteve Posted December 20, 2017 Share Posted December 20, 2017 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; } */ } Quote Link to comment Share on other sites More sharing options...
Explv Posted December 20, 2017 Share Posted December 20, 2017 (edited) @scriptersteve Follow some Java Swing Tutorials, there are plenty online. No one is going to make your GUI for you Edited December 20, 2017 by Explv Quote Link to comment Share on other sites More sharing options...
Apaec Posted December 20, 2017 Share Posted December 20, 2017 Tutorials are online, there are plenty of them!! Your best bet is probably to extend JFrame and work from there. GL! Apa Quote Link to comment Share on other sites More sharing options...
HeyImJamie Posted December 20, 2017 Share Posted December 20, 2017 Having a name like scriptersteve and not having a clue on how to script Quote Link to comment Share on other sites More sharing options...
Chikan Posted December 20, 2017 Share Posted December 20, 2017 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. Quote Link to comment Share on other sites More sharing options...
HeyImJamie Posted December 20, 2017 Share Posted December 20, 2017 8 minutes ago, Chikan said: It's a kind of name you grow into. Then call me big dick Jamie 1 Quote Link to comment Share on other sites More sharing options...
scriptersteve Posted December 20, 2017 Author Share Posted December 20, 2017 thanks, i'll look into it more and yeah i have absolutely no idea lol. It was more of let's aim for it :') Quote Link to comment Share on other sites More sharing options...