• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Is a JFrame right for this?

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Bartender
Posts: 1561
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your reply Pete, I'll spend some time looking into JPanels this morning
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic