Adding Button to my interface

View: New views
3 Messages — Rating Filter:   Alert me  

Adding Button to my interface

by AndrewSLH :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi, I have try to make a frame and adding some buttons following the tutorial under java.sun.com.  The button was successfully created but the location of the button is on the top centre of the frame and I have been trying to change the location of the button using button1.setLocation() etc but the button remains on the top centre.  Does anyone know how I can configure the location of the button instead of using JFrame in Netbean to just drag and drop the button to my desire location?  Thanks





Adding Button to my interface

by h3llt3ch :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://java.sun.com/docs/books/tutorial/uiswing/layout/index.html



You should read the tutorial on layouts in the link above.





Adding Button to my interface

by AndrewSLH :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks again Don