SampleApplet

From JavaWIDE

Jump to: navigation, search

01 import javax.swing.*;
02 import java.awt.*;
03 import java.awt.event.*;
04 import java.io.*;
05 import java.net.*;
06 
07 /**
08  * All about my applet here.
09  @author Jam Jenkins
10  */
11 
12 public class SampleApplet extends JApplet
13 {
14   public void init()
15   {
16     JLabel click = new JLabel();
17     Image image = getImageSampleApplet.class.getResource"JavaWIDE.png" ) );
18     click.setIconnew ImageIconimage ) );
19     Container content = getContentPane();
20     content.setBackgroundColor.BLUE );
21     content.setLayoutnew BorderLayout() );
22     content.addclick, BorderLayout.CENTER );
23   }
24   
25   public void start()
26   {}
27   
28   public void stop()
29   {}
30 }


Download/View SampleApplet.java





Views
Personal tools
Add to 
del.icio.usAdd to 
diggAdd to 
FacebookAdd to 
favoritesAdd to 
GoogleAdd to 
MySpaceAdd to 
PrintAdd to 
SlashdotAdd to 
StumbleUponAdd to 
Twitter