Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / June 2006

Tip: Looking for answers? Try searching our database.

I am trying to learn to program Java after a layoff

Thread view: 
jalexa9898 - 14 Jun 2006 19:50 GMT
I am kind of rusty so what I have been doing is a simple program where
I try to put a label on an applet and a button that changes the text of
the label. I am using Sun Java Studio Creater but I am a tad confused
because I have not done a lot of Java in a while. Can someone give me
some idea as to how I make a button change the text of a label? I was
under the impression I use its onClick event but I have been unable to
get the software to access that event or rather method.
Oliver Wong - 14 Jun 2006 20:04 GMT
>I am kind of rusty so what I have been doing is a simple program where
> I try to put a label on an applet and a button that changes the text of
[quoted text clipped - 3 lines]
> under the impression I use its onClick event but I have been unable to
> get the software to access that event or rather method.

   Assuming you're using the Swing API in your JApplet, see the following:

http://java.sun.com/docs/books/tutorial/uiswing/learn/example2.html#handlingEvents
http://java.sun.com/docs/books/tutorial/uiswing/events/index.html

   - Oliver
Paul Hamaker - 14 Jun 2006 21:14 GMT
Non-Swing:
http://javalessons.com/cgi-bin/fun/java-tutorials-main.cgi?ses=ao789
lesson 15.Break, source code lines 68 and 70.
Swing:
http://javalessons.com/cgi-bin/fun/java-tutorials-main.cgi?sub=gui&ses=ao789
g1.Simplest Swing, source line 44.
David Segall - 15 Jun 2006 16:04 GMT
>I am kind of rusty so what I have been doing is a simple program where
>I try to put a label on an applet and a button that changes the text of
[quoted text clipped - 3 lines]
>under the impression I use its onClick event but I have been unable to
>get the software to access that event or rather method.
Java Studio Creator is intended for producing web based applications
where the user interacts with the application using a web browser like
Firefox, and the application runs on a "remote" server like the Sun
Application Server included with Creator. The GUI designer is creating
Java Server Faces pages _not_ applets.

If you want to create an applet download NetBeans from
<www.netbeans.org>. If you are rusty I suggest you start with a
desktop application instead of an applet.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.