Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

designing a DnD Character Sheet

Genie Kusnick
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For my first real project using swing I'm trying to make a digital DnD character sheet.

Right now I have one panel that handles all the abilities. You can type in a value in to the ability score and the appropriate modifier is automatically generated.

The Saves panel works in a very similar way, but the total saves value relies on an ability modifier. I'd like to be able to have the ability modifier in the saves panel automatically updated
anytime a new value is entered in the abilities panel, but I'm not sure what the best way to make these two classes communicate is. Many other fields in the character sheet will rely on an
ability modifier or some other value to make calculations so I'd like to establish some kind of mediator class that would hold the values of everything on the character sheets and automatically
update certain values whenever a change is made to different fields.

Both these panels will eventually be contained in another panel.

Many of these classes contain main()s, they're not the actual mains and are just for temporary testing.

Ability Row -
Abilities Panel -

Save Row -
Save Panel -
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic