Start New Discussion within our Software Development Community

Hello I am new to Java. I am building a video game for school - similar to the Sims game - and have encountered an issue. My group is creting all the algorithims for calculating health, keeping track of time, achievments, etc. My job is to create the graphical interfaace.

What I wish to have the game screen with a rectangle on the side of the screen displaying these different files. The problem I have is that I cannot find out how to have thier files just output the specific data in specified postion simultanously while the game is in progress.

Is there a way I can do this without placing all thier functions in my file?

I got this idea from Games such as Age of the Empires, Mall Tycoon, or even any top-down RPG.

Also As a feature I was wondering if there was a simple method to hiding the rectangle. Similar to a popup menu or even the Windows Start toolbar (along the bottom); how you just place your cursor over it and it pops up. I did manage to find a file online that showed how to do this just that I recquired 4 files just to make the toolbar without any content.

Assuming that their files are classes with methods, then in your swing class, you will have instances of those classes. Then according to what the user clicks you will call the methods of those classes and display the results.

If those classes have main methods, then they are doing it wrong. The idea is to have classes with functionality inside, and in a "Main" class (swing, console), create those classes, call their methods and display the results.

This article has been dead for over six months. Start a new discussion instead.