I want to make a simulation similar to Conway's Game of Life with my own rules. The problem is that i have never coded any image processing software. I was thinking to use JButtons as the box , but i think that will be too heavy , so any good ideas on how i can do that?
4 replies to this topic
#1
Posted 31 March 2011 - 05:46 PM
|
|
|
#2
Posted 31 March 2011 - 06:06 PM
This really does necessitate a custom widget. I'd suggest you learn about painting with the Swing API. There isn't really any usable J-Widget for this, with the possible exception of JTable with seriously custom TableModel and TableCellRenderer subclasses. I wouldn't know how to do that with this widget though.
Wow I changed my sig!
#3
Posted 31 March 2011 - 06:30 PM
Cool game idea.
I might give this a go.
I'd create a class that represents my grid. My grid would be contained inside of a 2-dimensional boolean array.
After this, instead of using JButtons, I'd custom paint over JPanel.
An example might help though:
Creating the Demo Application (Step 3) (The Java™ Tutorials > Creating a GUI With JFC/Swing > Performing Custom Painting)
I might give this a go.
I'd create a class that represents my grid. My grid would be contained inside of a 2-dimensional boolean array.
After this, instead of using JButtons, I'd custom paint over JPanel.
An example might help though:
Creating the Demo Application (Step 3) (The Java™ Tutorials > Creating a GUI With JFC/Swing > Performing Custom Painting)
#4
Posted 01 April 2011 - 05:28 AM
well , aren't there any cellular automation tools in which you just define the rules and then rest of the work is done by the application?
#5
Posted 01 April 2011 - 12:41 PM
Have you tried sourceforge?
SourceForge.net: Software Search[]=trove%3A198
You can most likely extend some of the frameworks people have created.
SourceForge.net: Software Search[]=trove%3A198
You can most likely extend some of the frameworks people have created.
Edited by lethalwire, 01 April 2011 - 02:33 PM.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









