Tomas1122's Profile
Reputation: 0
Apprentice
- Group:
- Members
- Active Posts:
- 19 (0.08 per day)
- Joined:
- 03-October 12
- Profile Views:
- 44
- Last Active:
Oct 08 2012 07:38 PM- Currently:
- Offline
Previous Fields
- Dream Kudos:
- 0
Posts I've Made
-
In Topic: Japplet
Posted 4 Oct 2012
-
In Topic: Japplet
Posted 4 Oct 2012
-
In Topic: Japplet
Posted 4 Oct 2012
Thanks a lot pbl and cfoley.
. 1 more question. If i want to view the table made in java on webpage on my computer console and i put this code in html file...
<applet code ="Names.class" width="500" height ="500"> </applet>
why am i getting errors still. i know i have the html page set up right. -
In Topic: Random and Jtable
Posted 4 Oct 2012
help? -
In Topic: Random and Jtable
Posted 4 Oct 2012
import java.util.Random; import javax.swing.JFrame; import javax.swing.JScrollPane; import javax.swing.JTable; import java.awt.*; import java.awt.event.*; import javax.swing.*; /** * * @author Shashi Suthar */ public class Names extends JApplet implements ActionListener { JButton[] button; JLabel[] label; int[] nbClick; // Applet init method that will init the JComponent // will be called automatically when running an Applet // will be "manually" called by main() when running as an application @Override public void init() { // create the buttons and the labels that display how many // time the buttons were clicked button = new JButton[2]; label = new JLabel[button.length]; nbClick = new int[button.length]; // as a gridLayout of number of buttons X 2 for their corresponding labels setLayout(new GridLayout(button.length,2)); for(int i = 0; i < button.length; i++) { // create button button[i] = new JButton("Button #" + (i+1)); button[i].addActionListener(this); add(button[i]); // and its corresponding label label[i] = new JLabel(" Nb click: 0"); add(label[i]); } } @Override public void actionPerformed(ActionEvent e) { throw new UnsupportedOperationException("Not supported yet."); } public class Names extends JFrame {
What am i doing wrong to make it work as applet? . I get errors on this line "public class Names extends JFrame {"
My Information
- Member Title:
- New D.I.C Head
- Age:
- Age Unknown
- Birthday:
- Birthday Unknown
- Gender:
Contact Information
- E-mail:
- Private
Friends
Tomas1122 hasn't added any friends yet.
|
|


Find Topics
Find Posts
View Reputation Given

|
Comments
Tomas1122 has no profile comments yet. Why not say hello?