Need help with Swing

Need help with an engine or coding not on the list? Need help with a game or the website and forums here? Direct all questions here.
Post Reply
User avatar
Xaos
Posts: 946
Joined: Wed Jan 11, 2012 4:01 am

Need help with Swing

Post by Xaos »

So I'm in Netbeans and I'm using the 'design' view to create a Java GUI with Swing.

This is my GUI now.

Image

So my problems here are that:

1. I need to display my variable stock next to where I say Stock is
2. I need to display my variable money next to where I say Your Money is $
3. I need that text field input to be variable hE
4. I need that button to link to another jPanel that displays a bunch more variables

So basically this boils down to: How to link a text field to a variable, how to display a variable, how to create more than one panel (do i need to make another class?) and how do I make the button click display that next panel (action Listener here?). I can link the code for both the program and the GUI if needed, but im making it in Netbeans Design view, not hard-coding it.

Sorry for the hefty request, by the way ;)

I'm also okay if you link a good tutorial...I tried the one on the Oracle site with Netbeans, but didn't really get it from there.
User avatar
Jackolantern
Posts: 10893
Joined: Wed Jul 01, 2009 11:00 pm

Re: Need help with Swing

Post by Jackolantern »

It has been years since I have used Swing, so I don't think I could directly be much help, but this tutorial looks really nice :)
The indelible lord of tl;dr
Post Reply

Return to “Advanced Help and Support”