 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Québec Guest
|
Posted: Sun May 23, 2004 2:17 pm Post subject: netbean 3.6 timer bean |
|
|
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;
}
|
|
| Back to top |
|
 |
Québec Guest
|
Posted: Mon May 24, 2004 5:59 pm Post subject: Re: netbean 3.6 timer bean |
|
|
public JFrame() {
initComponents();
timer1.stat();
}
Thanks
"Québec" <notAgain (AT) enough (DOT) ca> a écrit dans le message de
news:zn2sc.8542$kv6.124535 (AT) weber (DOT) videotron.net...
| Quote: | 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;
}
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|