• Post Reply Bookmark Topic Watch Topic
  • New Topic

Is a JFrame right for this?  RSS feed

 
Tony Craven
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm trying to build a simulation environment for an artificial life project and I'd prefer not to use a JApplet.

My previous experience with Applets (I wrote a beat 'em up game for an under graduate project) was from a couple of years ago and I've been doing a lot of C++ programming since, so I have forgotten a lot.

I'd like to be able to display my simulation (I guess it would be like running a game in the Frame) - a moving robot around a 2D maze - and also include buttons for the user to pause the simulation as well as bring up other Frames with statistical information.

I'd also like to be able to network more than one simulation, I know there is a security issue with trying to network Applets in java though.

I'd also prefer to be able to run the simulation from a jar file.

While I don't have a lot of time to code this project I'd prefer if someone could send me links for tutorials than actually tell me explicitly how to go about it. I've been going through the tutorials on the Sun site but I have to say that I find them a bit hard to follow.

Thanks very much for your time,

Anthony
 
pete stein
Bartender
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To answer one part of your question (I think), what component to code this in:

I recommend that you code this in a JPanel, or better stated as a subclass of a JPanel. This way you have the flexibility to display your program as a JFrame, a JApplet, a JDialog, or any other root component that would allow you to add a JPanel.
 
Tony Craven
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply Pete, I'll spend some time looking into JPanels this morning
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!