开发者

Java 2D game menu

I'm making a swing Java board game, but aside from a JTextPane for the Chat, everything have been done using java 2D.

So, I would like to know the best way to implement a "Start Game" menu with some options like (Join Game开发者_如何学JAVA, Create Game, Options, Quit).

  • Should I draw the options using java 2D or create a class menuOption extending something like a JLabel?
  • And Should I create a JPanel for each menu level, if so, what is the best way to change from one JPanel to another?

I could simple use a MenuBar but it doesn't look so nice.

Thanks


Sice it's an opinion what you want, i'll just give you mine, but in the end it all depends on you criteria.

I like more the canvas, since it's all drawing and i like the way the menu is made up, so i think java 2D, it's i nice way to do it

I don't like the JPanel nor the MenuBar, since both of them look very ...simple, they are too common, and what i want in my geames, it's a little of originality, that's way i like to draw it all.


Best way to change JPanels is using CardLayout.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜