Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (748)
Games in Android Showcase (226)
games submitted by our members
Games in WIP (834)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Game Development / Newbie & Debugging Questions / Java how to make menu, restart button and .jar file on: 2011-12-19 18:22:20
Hello everyone, I'm new here. I'm working in a game named Spacedodge, though the name isnt chosen yet. Anyway, im beginner in java and need some help with my game.

I don't like game starting immediately after i open it. So i would like to make a menu, with couple buttons in it. How can i make it, and how can i make it to open before anything else?
I have 7 classes, Craft(it means spaceship), Enemyship, Missile, Craft2, SpaceDodge, Values and Window class. Craft and craft2 are just the players, missile is the missile players can shoot, enemy ship is the enemy(surprise?). SpaceDodge is the window where you can play the game and it makes the window size 400, 300, setDefaultCloseOperation, etc. Window class draws all the images. And I have Values class. It just makes couple variables, and Window and Craft classes extends it. So, how can I make a menu?

Another problem. How can i convert this to a file that can be played without having to open eclipse.(jar file or anything that can be played) I'm using Eclipse. I tried export but there comes and error, "A Java Exception has occurred". Should i use runnable jar file? If i do, what is the differences of these?

And my third problem is, when the game ends because player dies, it shows String msg. I would like to make a possibility to restart the program by pressing R button.

Thanks for help, tell me if i need to show any line of codes.
Pages: [1]
xxMrPHDxx (286 views)
2017-12-31 17:17:51

xxMrPHDxx (88 views)
2017-12-31 17:15:51

xxMrPHDxx (144 views)
2017-12-28 18:11:33

Ecumene (299 views)
2017-09-30 02:57:34

theagentd (489 views)
2017-09-26 18:23:31

cybrmynd (518 views)
2017-08-02 12:28:51

cybrmynd (461 views)
2017-08-02 12:19:43

cybrmynd (443 views)
2017-08-02 12:18:09

Sralse (402 views)
2017-07-25 17:13:48

Archive (1303 views)
2017-04-27 17:45:51
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!