Sheng Ning

Greenhorn
+ Follow
since Mar 12, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Sheng Ning

Hi any idea why this cant work ?]
cant seem to run it or did i use the wrong way to run applets ?
enlighten me please
thks
import javax.swing.JOptionPane;
public class Trial extends javax.swing.JFrame {
public Trial() {
initComponents();
}
private void initComponents() {
jButton1 = new javax.swing.JButton();
getContentPane().setLayout(new java.awt.FlowLayout());
addWindowListener(new java.awt.event.WindowAdapter() {
public void windowClosing(java.awt.event.WindowEvent evt) {
exitForm(evt);
}
});
jButton1.setText("Hit me!");
jButton1.setToolTipText("");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
handler(evt);
}
});
getContentPane().add(jButton1);
pack();
}
private void handler(java.awt.event.ActionEvent evt) {
java.util.Random r=new java.util.Random();
JOptionPane.showMessageDialog(null,r.nextInt(99999)+" "+r.nextInt(45234));
}
private void exitForm(java.awt.event.WindowEvent evt) {
System.exit(0);
}
public static void main(String args[]) {
new Trial().show();
}
private javax.swing.JButton jButton1; }
21 years ago
heya !
may i know hwo to close an applet ?
wats the command for it ?
thnks
21 years ago
heya !
may i know hwo to close an applet ?
wats the command for it ?
thnks
21 years ago
Hi
Need to ask u guys a question
Is there any codes that can help me get two random number ?
thnks^^
21 years ago