+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: CodeCall's First Applet - Simple Version !

  1. #1
    Join Date
    May 2008
    Location
    Hell
    Posts
    3,852
    Blog Entries
    4
    Rep Power
    49

    CodeCall's First Applet - Simple Version !

    Hey CodeCall, while reading C++ things I thought I have forgotten to show you guys about applets

    So today I present you simple tutorial about how to create an applet(Java)!

    So lets move on !

    The library we will use for the applet !
    Code:
    import java.awt.*;
    import javax.swing.*;
    We will use the .awt.*; library, since we are going to create a simple interface why not use the library for it

    The base of the application !
    Code:
    public class CodeCallApplet extends JApplet {
    public void init() {
    Here are we making it clear for the application that we are gonna use the JApplets functions, i.o.w; we are going to inheritance its functions.

    Our functions !
    Code:
    JLabel L = new JLabel("Welcome to CodeCall Applet !,JLabel.CENTER);
    add(L);
    L.setOpaque(true);
    L.setBackground(Color.gray);
    L.setForeground(Color.black);
    L.setFont(new Font("SansSerif", Font.BOLD, 24));
    }
    }
    There with out message and positioning it as well declaring no transparent background also what colours we will use and font

    The whole code !
    Code:
    import java.awt.*;
    import javax.swing.*;
    public class CodeCallApplet extends JApplet {
    public void init() {
    JLabel L = new JLabel("Welcome to CodeCall Applet !,JLabel.CENTER);
    add(L);
    L.setOpaque(true);
    L.setBackground(Color.white);
    L.setForeground(Color.black);
    L.setFont(new Font("Arial", Font.BOLD, 24));
    }
    }
    However we are not done yet !
    We didn't have main, oh noes, well we will let the browser do the job

    So let's create a html file to try out our applet !

    The html file !
    Code:
    <html>
    <head>
    <title>CodeCall's first applet</title>
    </head>
    <body>
    CodeCall Applet !
    <br>
    <applet code="TestApplet.class"
    width="400"
    height="150">
    </applet>
    <br>
    </body>
    </html>
    So this code is basic html...

    So I hope you guys enjoy this and will have some cool usage of it sometime in life

    Cheers !

    P.S - Have a screenshot, also pardon the black;"private things there nowdays.."
    CodeCall's First Applet - Simple Version !-thetest.png

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Location
    Advertising world
    Posts
    Many

     
  3. #2
    Jordan Guest

    Re: CodeCall's First Applet - Simple Version !

    Very cool! +rep

  4. #3
    Join Date
    May 2008
    Location
    Hell
    Posts
    3,852
    Blog Entries
    4
    Rep Power
    49

    Re: CodeCall's First Applet - Simple Version !

    Quote Originally Posted by Jordan View Post
    Very cool! +rep
    Thanks

  5. #4
    Join Date
    Nov 2008
    Location
    Kosovo.
    Posts
    2,391
    Rep Power
    30

    Re: CodeCall's First Applet - Simple Version !

    Great Tutorial Turk4n , +rep .

  6. #5
    Join Date
    May 2008
    Location
    Hell
    Posts
    3,852
    Blog Entries
    4
    Rep Power
    49

    Re: CodeCall's First Applet - Simple Version !

    Quote Originally Posted by mendim. View Post
    Great Tutorial Turk4n , +rep .
    Thank you

  7. #6
    Join Date
    Aug 2007
    Location
    Gizeh, Al Jizah, Egypt, Egypt
    Posts
    8,675
    Blog Entries
    12
    Rep Power
    81

    Re: CodeCall's First Applet - Simple Version !

    very nice, i have exam in java on saterday
    this must come in handy
    yo homie i heard you like one-line codes so i put a one line code that evals a decrypted one line code that prints "i love one line codes"
    Code:
    eval(base64_decode("cHJpbnQgJ2kgbG92ZSBvbmUtbGluZSBjb2Rlcyc7"));
    www.amrosama.com | the unholy methods of javascript

  8. #7
    Join Date
    May 2008
    Location
    Hell
    Posts
    3,852
    Blog Entries
    4
    Rep Power
    49

    Re: CodeCall's First Applet - Simple Version !

    Quote Originally Posted by amrosama View Post
    very nice, i have exam in java on saterday
    this must come in handy
    Cool

  9. #8
    Join Date
    Aug 2007
    Location
    Gizeh, Al Jizah, Egypt, Egypt
    Posts
    8,675
    Blog Entries
    12
    Rep Power
    81

    Re: CodeCall's First Applet - Simple Version !

    if u wanna ean extra rep
    write a simple tutorial on how to get data from a server and dislay it in a page
    yo homie i heard you like one-line codes so i put a one line code that evals a decrypted one line code that prints "i love one line codes"
    Code:
    eval(base64_decode("cHJpbnQgJ2kgbG92ZSBvbmUtbGluZSBjb2Rlcyc7"));
    www.amrosama.com | the unholy methods of javascript

  10. #9
    Join Date
    Sep 2008
    Location
    Kosovo
    Posts
    4,032
    Rep Power
    44

    Re: CodeCall's First Applet - Simple Version !

    nice tutorial .. +rep

  11. #10
    Join Date
    May 2008
    Location
    Hell
    Posts
    3,852
    Blog Entries
    4
    Rep Power
    49

    Re: CodeCall's First Applet - Simple Version !

    Quote Originally Posted by Egz0N View Post
    nice tutorial .. +rep
    Thanks

+ Reply to Thread
Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. JComboBox - Simple Version !
    By Turk4n in forum Java Tutorials
    Replies: 9
    Last Post: 08-07-2009, 10:22 PM
  2. ArrayList - Simple version !
    By Turk4n in forum Java Tutorials
    Replies: 14
    Last Post: 01-09-2009, 04:57 AM
  3. Abstract method(SIMPLE VERSION)
    By Turk4n in forum Java Tutorials
    Replies: 2
    Last Post: 09-20-2008, 12:35 AM
  4. Tutorial paint dots(simple version)
    By Turk4n in forum Java Tutorials
    Replies: 6
    Last Post: 06-25-2008, 11:07 PM
  5. Replies: 1
    Last Post: 01-29-2008, 11:40 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts