10 Sep 2008 @ 11:38 PM 
1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 3.5 out of 5)
Loading ... Loading ...
2,464 views

I got a request from someone that asked me to create an applet that can be used as a quiz, well since I had a bit of time today I went ahead and coded it for him. The questions will be randomized every time you run the applet but as of now I’ve only made 5 questions so the application picks the first 5 questions available. I’ll see if I can upload a demo somewhere to show you how it works but the applet needs a java.policy file that doesn’t run in a browser so i’ll see if i can manage to create a self signed java applet.

/* AUTOMATICALLY GENERATED ON Tue Apr 16 17:20:59 EDT 2002*/
/* DO NOT EDIT */

grant {
permission java.security.AllPermission;
};

Screenshot(s):


What do you think about it? Comments/suggestions are welcome!
More »

Your Ad Here
 22 May 2008 @ 10:22 PM 
1 Star2 Stars3 Stars4 Stars5 Stars (3 votes, average: 3.67 out of 5)
Loading ... Loading ...
431 views

Someone asked me to write an application that:

• Use an array to store the data for the different brands.
• Must have 4 additional index positions available for data entry so that I may be able to add
• Must ensure that PR or Plain Wrap is not duplicated in data entry
• Cannot use scanner
• You may choose to use 2 dimensional array (one class needed) or object of array(two classes needed)

Output:
• You will need to display the plain wrap number chosen and the corresponding Brands for that particular part.

So here it is:

More »

Your Ad Here
1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5 out of 5)
Loading ... Loading ...
736 views

Here's a demo I wrote to show an example of the usage of a timertask. This demo will show a "reminder" dialog after x seconds.

JAVA:
  1. public class TimerTaskDemoV2 extends JDialog  implements ActionListener {
  2. Timer timer;
  3. JTextArea info = new JTextArea("This is a reminder..\nBy: HappyFace\nwww.engineeringserver.com");
  4. public TimerTaskDemoV2(int seconds) {
  5. timer = new Timer();
  6. timer.schedule(new RemindTask(), seconds*1000);
  7. }
  8. public TimerTaskDemoV2(){
  9. getContentPane().setLayout(null);
  10. info.setEditable(false);
  11. info.setBounds(0,0,200,100);
  12. ok = new JButton("Close");
  13. ok.addActionListener(this);
  14. ok.setBounds(0,100,200,30);
  15. add(info);
  16. add(ok);
  17. setTitle("Reminder");
  18. setDefaultCloseOperation(0);
  19. setSize(207,155);
  20. setResizable(false);
  21. setLocationRelativeTo(null);
  22. setVisible(true);
  23. }
  24. class RemindTask extends TimerTask {
  25. public void run() {
  26. TimerTaskDemoV2 tmp = new  TimerTaskDemoV2();
  27. timer.cancel();
  28. }
  29. }
  30. public void actionPerformed(ActionEvent e) {
  31. if(e.getSource() == ok){
  32. System.exit(0);
  33. }
  34. }
  35. public static void main(String args[]) {
  36. int wait = 5;
  37. System.out.println("Wait "+ wait + " second(s)");
  38. new TimerTaskDemoV2(wait);
  39. }
  40. }

Your Ad Here
\/ More Options ...
Change Theme...
  • Users » 888
  • Posts/Pages » 1,444
  • Comments » 506
Change Theme...
  • VoidVoid « Default
  • LifeLife
  • EarthEarth
  • WindWind
  • WaterWater
  • FireFire
  • LightLight

Online Users



    No Child Pages.

Forum



    No Child Pages.