![]() After you've finished buying stocks for the day, you can click the Next Day button on the Game Controller to begin the next trading day, after which the stock prices will fluctuate in response to the news stories that have just been published. You'll be prompted for the number of shares to purchase and see that the stocks have been added to your portfolio after confirming the trade. The Game Controller component also shows that you have some money to use for purchasing stocks, which you can do by selecting a stock in the Exchange Listing component and then clicking the Buy Selected Stock button just below that table. Start a new game by clicking the Start Game button in the Game Controller component, which will open the stock market for trading. They'll all show up on the left side of the screen, so you'll have an opportunity to practice moving them around to emulate the layout shown in the screenshot. Once the platform is started, click the View menu and select each of the first four menu items to display the game's components. The fonts and colors in yours will probably differ from those one in my screenshot, but I will cover how to improve the default settings near the end of the article. If you performed all the steps correctly, you'll see the NetBeans platform launch. Run the ant tryme command to launch the application. ![]() Unpack the stock trader game source code and change to the cluster_build_harness/nbbuild subdirectory that it created.If you set it correctly, you'll see a directory named platform5 when you list the contents of the directory pointed to by the NETBEANS_HOME variable. Set the NETBEANS_HOME environment variable to point to the directory created when you unpacked the NetBeans Platform binary in the previous step.Download and unpack the NetBeans platform binary, version 4.1.Please refer to my previous article for more details including information about the versions used and the links to download them. You'll need to perform the following steps to run the game. Incidentally, the cluster build harness previously had a bug that prevented it from working with version 1.6.5 of Ant, but I've fixed this in the included copy. In order to follow along with my examples, I encourage you to download the source code for the stock trader game, which includes all the source code and a copy of the cluster build harness needed to compile and launch the program. How to Start and Play the Stock Trader Game Troubleshooting a NetBeans Platform Application.The Stock Trader Game User Interface Module.Porting a Java Swing Application to the NetBeans Platform.Separating Interface from Implementation. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |