I wish to deflect future RTFM responses.
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 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 wish to deflect future RTFM responses.
Good for you. Mind you, starting a thread
with that statement is less likely to achieve
the desired result, than writing sensible posts.
> Please don't point me to the java API specifications;
Are you referring to the JLS?
>..I know where
> that is, and it doesn't constitute as an FM;
Frequency modulation? Field manual? What?
...
> I already have a java.awt.Frame
Why are you working with AWT?
>..(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.
A good way to find information at Sun is
to use a search string along these lines..
<http://www.google.com/search?q=java+tutorial+event+click>
Start it with 'java tutorial' and end with a
couple of words of interest.
> 2. It's impossible to close the GUI by the X button in the top left-
> hand corner of the window.
<http://www.google.com/search?q=java+tutorial+event+window>
Andrew T.
Dustan - 24 Feb 2007 19:37 GMT
> > I wish to deflect future RTFM responses.
>
[quoted text clipped - 10 lines]
>
> Frequency modulation? Field manual? What?
What does RTFM stand for? Now take off the RT.
> > I already have a java.awt.Frame
>
> Why are you working with AWT?
Because I haven't had a FM to work with; I had to start somewhere.
> >..(i.e. "public SomeWindow extends
> > Frame") written up, and have two issues in particular with it:
[quoted text clipped - 14 lines]
>
> Andrew T.
Thanks.
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.
> I already have a java.awt.Frame (i.e. "public SomeWindow extends
> Frame") written up, and have two issues in particular with it:
[quoted text clipped - 5 lines]
> 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
Dustan - 24 Feb 2007 19:39 GMT
On Feb 24, 8:48 am, Thomas Kellerer <TAAXADSCB...@spammotel.com>
wrote:
> Dustan wrote on 24.02.2007 15:02:
>
[quoted text clipped - 9 lines]
> 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:
[quoted text clipped - 11 lines]
> 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.
Jeff - 27 Feb 2007 02:18 GMT
> On Feb 24, 8:48 am, Thomas Kellerer <TAAXADSCB...@spammotel.com>
> wrote:
[quoted text clipped - 33 lines]
>
> 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.