Hi Darren:
A few quick pointers to get you started:
Warning: I just cobble things together as I go along, so perhaps what I've done are Not the best things to use as templates
You will want to inherit from Window instead of Frame for the GUI Widgets
Registering the widgets you probably already have a handle on. I use a primitive mechanism for GameFrames to register with the GUI instance. But that is kludgey. You may want to look at Component and see how it registers listeners for a more nuanced version.
Adding menus in 1.1 you can see in MapSquaresFrame or ToolBar. I don't know if its changed in 1.2
Mouse and Key listeners are also in MSF, although I'm using a 1.1 method right now.
What IDE are you using? If its Visual Cafe, you can just start a new project and add some interactions to see how it does them. I don't know about J++. If you can't autogenerate code, let me know and I can slap something together for you in about 10 minutes!
Good Luck,
Mark
PS One other thought. F_Smith and Ferdi both know their Java, and would probably be willing to help by giving suggestions on the best way to go about it. You might want to put together a summary and email them. Just search on their names to find a post, which will have their email refs.
Also the comp.lang.java.* lists are a good way to get answers sometimes.
[This message has been edited by Mark_Everson (edited December 29, 1999).]
A few quick pointers to get you started:
Warning: I just cobble things together as I go along, so perhaps what I've done are Not the best things to use as templates
You will want to inherit from Window instead of Frame for the GUI Widgets
Registering the widgets you probably already have a handle on. I use a primitive mechanism for GameFrames to register with the GUI instance. But that is kludgey. You may want to look at Component and see how it registers listeners for a more nuanced version.
Adding menus in 1.1 you can see in MapSquaresFrame or ToolBar. I don't know if its changed in 1.2
Mouse and Key listeners are also in MSF, although I'm using a 1.1 method right now.
What IDE are you using? If its Visual Cafe, you can just start a new project and add some interactions to see how it does them. I don't know about J++. If you can't autogenerate code, let me know and I can slap something together for you in about 10 minutes!
Good Luck,
Mark
PS One other thought. F_Smith and Ferdi both know their Java, and would probably be willing to help by giving suggestions on the best way to go about it. You might want to put together a summary and email them. Just search on their names to find a post, which will have their email refs.
Also the comp.lang.java.* lists are a good way to get answers sometimes.
[This message has been edited by Mark_Everson (edited December 29, 1999).]
Comment