Java-Gaming.org
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
Featured games (78)
games approved by the League of Dukes
Games in Showcase (406)
games submitted by our members
Games in WIP (292)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Game Development / Newbie & Debugging Questions / Re: Graphical User Interface - Buttons on: 2011-06-20 19:19:55
Yea. After replying I did some more research and found a better way than what I thought.

Thanks though.
2  Game Development / Newbie & Debugging Questions / Re: Graphical User Interface - Buttons on: 2011-06-20 18:55:42
Are you using Java2D or LWJGL?
Java2D

I'm confused. Why wouldn't you just use a JButton?

Recommended reading: http://download.oracle.com/javase/tutorial/uiswing/components/button.html
Thanks, but I'm not that stupid. If I wanted a regular button I'd use one. You probably just didn't see the bolded and underlined word "custom" in my list? I could probably extend JButton and override paint or whatever, but that's what I edited into my post basically and I'm just asking people if that's the proper way to do it.
3  Game Development / Newbie & Debugging Questions / Graphical User Interface - Buttons on: 2011-06-20 08:36:03
I'm making a multiplayer RPG with a friend. I've basically finished writing the server skeleton (feel free to take a look and tell me what you think), but there isn't much more I can do until we work on the client and get some stuff sent to the server to interpret.

What I need help with right now is the best way to handle a graphical user interface. I need help with the entire thing in general, like:
  • When do you paint it?
  • How can you have intractable features, like custom buttons.
A good example would be the minecraft 'options' menu, how they have custom input fields:


Any help is appreciated.

EDIT - Ok I think I know how to do buttons, I can just create a custom component called CustomButton or something that has a backing image or something right? And use the mouse events to handle input?
Pages: [1]
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
 
Get high quality music tracks for your game!

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

The invasion has landed! On Mars! And you're there to beat 'em!
cubemaster21 (66 views)
2013-05-17 21:29:12

alaslipknot (75 views)
2013-05-16 21:24:48

gouessej (107 views)
2013-05-16 00:53:38

gouessej (103 views)
2013-05-16 00:17:58

theagentd (114 views)
2013-05-15 15:01:13

theagentd (103 views)
2013-05-15 15:00:54

StreetDoggy (148 views)
2013-05-14 15:56:26

kutucuk (171 views)
2013-05-12 17:10:36

kutucuk (169 views)
2013-05-12 15:36:09

UnluckyDevil (178 views)
2013-05-12 05:09:57
Complex number cookbook
by Roquen
2013-04-24 12:47:31

2D Dynamic Lighting
by Oskuro
2013-04-17 16:46:12

2D Dynamic Lighting
by Oskuro
2013-04-17 16:45:57

2D Dynamic Lighting
by Oskuro
2013-04-17 16:23:20

Noise (bandpassed white)
by Roquen
2013-04-05 17:36:01

Noise (bandpassed white)
by Roquen
2013-04-03 16:17:38

Java Data structures
by Roquen
2013-03-29 13:21:12

Topic Request
by kutucuk
2013-03-22 21:42:01
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!
Page created in 0.127 seconds with 21 queries.