Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (513)
Games in Android Showcase (120)
games submitted by our members
Games in WIP (577)
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 17: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 16: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 06: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]
 

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

The first screenshot will be displayed as a thumbnail.

Longarmx (52 views)
2014-10-17 03:59:02

Norakomi (42 views)
2014-10-16 15:22:06

Norakomi (32 views)
2014-10-16 15:20:20

lcass (37 views)
2014-10-15 16:18:58

TehJavaDev (68 views)
2014-10-14 00:39:48

TehJavaDev (66 views)
2014-10-14 00:35:47

TehJavaDev (59 views)
2014-10-14 00:32:37

BurntPizza (73 views)
2014-10-11 23:24:42

BurntPizza (45 views)
2014-10-11 23:10:45

BurntPizza (85 views)
2014-10-11 22:30:10
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
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!