This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Questions on Swing implementation maturity via an example


As has been pointed out to me off-list, I made two rather obvious
mistakes in my code:
(1) There is no 'this' in a static method. I should have instantiated
the class and passed that to addActionListener.
(2) I forgot to add the button to the content frame of my window by
calling getContentFrame() on the JFrame.

I seem to repeat these two mistakes each time I start a Java/Swing
application and unfortunately I quickly fired off a message to the list
rather than trying to think what the problem could be.

Apologies.
Patrick


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]