• Post Reply Bookmark Topic Watch Topic
  • New Topic

Form Functions...Need a button!  RSS feed

 
Derek Kennard
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Developers...I am very new to the Java language. I need to add the ability to a button to clear all data entered on the form. I built the form in NetBeans 6.7 on a Swing Application Framework.

I recently installed Netbeans IDE 6.7 and I'm really impressed with what I have been able to accomplish with little understanding. My form is not currently functional in any way, I just need some basic features for the presentation.
 
pete stein
Bartender
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
NetBeans code generation will get you up and running and creating pretty GUI apps quickly, but to be able to modify them or move further (such as clearing JTextFields and what not) you have no choice but to go through the Sun Swing tutorials. I'd look into the JTextField section first to learn how to get information from your fields, how to set your fields, and how to clear your fields. Then look at the JButton section and the how to write an ActionListener section on how to create buttons that can do your desired actions for you. I will add that to do Swing well will require a solid understanding of basic Java. Best of luck!

Some places to look:
Using Swing Components
How to Use Text Fields
How to Use Buttons
Writing Event Listeners
How to Write an Action Listener
 
Campbell Ritchie
Sheriff
Posts: 53779
128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And welcome to JavaRanch
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!