Re: Ok, so where's the FM?



On Feb 24, 2:39 pm, "Dustan" <DustanGro...@xxxxxxxxx> wrote:
On Feb 24, 8:48 am, Thomas Kellerer <TAAXADSCB...@xxxxxxxxxxxxx>
wrote:

Dustan wrote on 24.02.2007 15:02:

I wish to deflect future RTFM responses.

Despite your wish I *will* point you to the tutorial

Please don't point me to the java API specifications; I know where
that is, and it doesn't constitute as an FM; it's messy and there's no
easy way to find exactly what you need, unless you happen to know the
exact right terminology.

I don't agree with you on that. I have always found the necessary interfaces in
the API docs. Especially if I have a "starting class" to look at, as you have.

So where in the API docs is the solution to my problem? I didn't say
it's useless, but it doesn't answer every question you might have.

I already have a java.awt.Frame (i.e. "public SomeWindow extends
Frame") written up, and have two issues in particular with it:
1. I have no idea how to detect events. In particular, I need to
detect button clicks on a particular area of the canvas.
2. It's impossible to close the GUI by the X button in the top left-
hand corner of the window.

Knowing this, can anyone point me to a tutorial/manual/reference that
has the information I need?

I don't have any tutorials on AWT at hand, but if there isn't a really, really
good reason to restrict yourself to AWT, I suggest you read the Swing tutorial

http://java.sun.com/docs/books/tutorial/uiswing/index.html
especially:http://java.sun.com/docs/books/tutorial/uiswing/events/index.html

Thanks; I'll take a look at that.


What are you using to write the program? That can make a difference to
your approach. For example, in NetBeans click the Connection Mode
button, click your frame, then click any other object. A window opens
where you can choose the event you wish to respond to. Choose
MouseClicked, then UserCode, and everything is set up for you, all you
need is to write the code you wish executed for a mouse click. Clearly
it is better to understand what underlying code is being in essence
written for you, but as far as rapid development it is nice to have
the IDE generate some of the code for you automatically.

.


Quantcast