AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Make jframe for mac11/6/2023 ![]() could just import javax.swing.* and java.awt.* etc. ![]() Imports are listed in full to show what's being used Not necessarily mandatory, but to make the frame close when you hit the 'x' button in the top right hand corner we need to add the line: tDefaultCloseOperation(JFrame.EXITONCLOSE) To make the frame a proper size so everything fits we need to run the pack command: frame. ![]() Compare this Java code with program listing generated from the Coding a Simple Graphical User Interface - Part II which uses the NetBeans GUI Builder to create the same GUI application.
0 Comments
Read More
Leave a Reply. |