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 / First Aid / May 2004

Tip: Looking for answers? Try searching our database.

netbean 3.6 timer bean

Thread view: 
Qu?bec - 23 May 2004 15:17 GMT
Hi,

Almost all the code is generated. So ?

jTextField1.setText("ok"); does not print ok.

Jean

--------------------------------------------------------------------------
public class JFrame extends javax.swing.JFrame {

     public JFrame() {
       initComponents();
   }

   private void initComponents() {
       timer1 = new org.netbeans.examples.lib.timerbean.Timer();
       jTextField1 = new javax.swing.JTextField();

       timer1.setDelay(300L);
       timer1.addTimerListener(new
org.netbeans.examples.lib.timerbean.TimerListener() {
           public void onTime(java.awt.event.ActionEvent evt) {
               timer1OnTime(evt);
           }
       });

       addWindowListener(new java.awt.event.WindowAdapter() {
           public void windowClosing(java.awt.event.WindowEvent evt) {
               exitForm(evt);
           }
       });

       jTextField1.setText("jTextField1");
       getContentPane().add(jTextField1, java.awt.BorderLayout.CENTER);
       pack();
   }

=============   HERE  ===========
   private void timer1OnTime(java.awt.event.ActionEvent evt) {
       jTextField1.setText(evt.toString());
       jTextField1.setText("ok");
   }

   private void exitForm(java.awt.event.WindowEvent evt) {
       System.exit(0);
   }

   public static void main(String args[]) {
       new JFrame().show();
   }

   private javax.swing.JTextField jTextField1;
   private org.netbeans.examples.lib.timerbean.Timer timer1;

}
Qu?bec - 24 May 2004 18:59 GMT
     public JFrame() {
       initComponents();
timer1.stat();
   }

Thanks
> Hi,
>
[quoted text clipped - 52 lines]
>
> }


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.