Jframe window builder [message #942342] |
Sat, 13 October 2012 12:20  |
Eclipse User |
|
|
|
Hi, I am learning Java and i am staring with GUI and i want to make a short game with three Jframes that link to each other. that when the button on the first Jframe is pressed it will take you to the next panel that will say what you have chosen and then go to the third page to show the winner. Please help, i do not know how to switch between Jframes.
|
|
|
Re: Jframe window builder [message #947126 is a reply to message #942342] |
Tue, 16 October 2012 20:59   |
Eclipse User |
|
|
|
Well first of all, you can only design one of the JFrames at a time in WindowBuilder.
Second of all, take a look at JFrame.setDefaultCloseOperation() and swing.WindowConstants. Then decide if you want to have your JFrames HIDE_ON_CLOSE or DISPOSE_ON_CLOSE. Then setup your buttons with listeners which will close the current JFrame and open the next one.
|
|
|
Re: Jframe window builder [message #947366 is a reply to message #942342] |
Wed, 17 October 2012 03:09  |
Eclipse User |
|
|
|
As Michael said, you can use WindowBuilder to create your JFrames (one per class). The logic you use to tie your JFrames together is up to you and there are many ways that you could do it. Michael's suggestions are good. In general, however, this forum is not the correct place to ask Swing how-to questions.
|
|
|
Powered by
FUDForum. Page generated in 0.03620 seconds