0

I have made a tetris game on my own and am trying to have options in the menu where when clicked, will change the frame to that size such as small, medium, large. I am trying to do this on a frame and at first I tried setting the preferred method for each menu item respectively using Abstract Listeners but it didn't work. I can't think of how to go about resizing a window. any suggestions? Thanks!

2
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by skylinepkr
0

You don't say what layout manager you are using, but you could resize the components in the window depending on which menu item is selected, then pack() the window so it fits the re-sized components.

0

I'm sorry, I am using BorderLayout and I also figured it out :)
I used a method called setSize(Dimension);

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.