Watch videos with subtitles in your language, upload your videos, create your own subtitles! Click here to learn more on "how to Dotsub"

Setting up the Menu

0 (0 Likes / 0 Dislikes)
Setting up and designing the Main Menu The desired output or illustration of the main menu must be like this. In order to put an action event in this button, right click on it and click Events then actionPerformed. This will show the source code of the interface. To put an action event in the button, set the all the other JPanel's visibility to false. Then set the destination JPanel's visiblity to true. Do these steps as well to the other JPanels so that the panels will not overlap each other. Take note of the exact variable name of each controls and containers to prevent errors. Adjust the preferred size to fit all the elements inside the container. To make these panels, just drag and drop necessary components from the palette. Then setup or design it the way it should look like Then code other necessary commands to come up with the desired features of the menu. You can also just right click the element and edit its properties. To start the game, we will use the dispose() command to close the Menu JFrame. If the player clicked this button, the menusound must stop. The sound effects of this game uses the SoundEffect class. The SoundEffect class contains the play, stop and loop methods. After this, create a method that opens a new JFrame. Code all the necessary properties for the frame. After that, dispose the frame of the menu so that the frame of the game will appear properly. Edit all the properties of the frame according to the desired output. In order to set the JFrame to have multiple panels, set its layout to overlay. Edit all the other necessary properties to achieve the desired output. To set the JFrame's layout to overlay, just right click the JFrame and click 'Set Layout'. Then click 'Overlay Layout'.

Video Details

Duration: 4 minutes and 28 seconds
Country:
Language: English
License: Dotsub - Standard License
Genre: None
Views: 1
Posted by: c.ibasco on Mar 20, 2018

Caption and Translate

    Sign In/Register for Dotsub to translate this video.