October 2017
Beginner
318 pages
7h 26m
English
Now let's see what else we can do with our existing JFrame class. When our JFrame window appeared, it was very small and hard to see. A program window of such a size is never really going to be useful to anyone, so let's see what powers frame gives us in terms of setting the window's size. Often, we're going to use the setPreferredSize method to apply a size to our JFrame class. There is also a setSize method, but this method will not give us exactly what we expect it to at all times. This is because right now our JFrame class is set to be resizable, and it's not appropriate for us to explicitly assign a size to it; rather, we should instruct it that given no other input from the user, meaning resizing JFrame ...
Read now
Unlock full access