SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: Reading Source

  1. #1
    SitePoint Enthusiast Scottie2Hottie7's Avatar
    Join Date
    Jul 2004
    Location
    England
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Reading Source

    WARNING - LOTS OF CODE HERE

    I Have Got A Java File (.java) And Want To Display The Source On A Page Without Having To Update The Webpage

    So I Tried Using An ActiveXObejct. It Works On The Home PC, But Reports The Error 'Automation Service Not Available'.

    I Cannot Just Do A Link, Because Tripod Put Adverts On The Bottom Of Every File That Is Not An Image And Not A *.txt File

    Please Help Me! (See Below)

    --------------------------------------------------------------------------

    So I Want A Way To Convert This
    import java.awt.*; import java.awt.event.*; import java.awt.image.*; import java.net.*; import java.applet.*; public class Pixelus extends Applet implements MouseListener { Image Ioutsquare; Image Ioversquare; Image Idownsquare; Image squarelist[]; public void init() { Ioutsquare = getImage(getCodeBase(), "images/squareout.gif"); Ioversquare = getImage(getCodeBase(), "images/squareover.gif"); Idownsquare = getImage(getCodeBase(), "images/squaredown.gif"); } public void paint(Graphics g) { for (int x=0; x<5; x++) { for (int y=0; y<5; y++) { g.drawImage(Ioutsquare, x*20, y*20, this); } } } public void mouseReleased(MouseEvent e) { } public void mousePressed(MouseEvent e) { } public void mouseClicked(MouseEvent e) { } public void mouseEntered(MouseEvent e) { } public void mouseExited(MouseEvent e) { } }
    That Has 153 Lines Of This

    <!-- ********************************************************** -->
    <!-- * START TRIPOD AD CODE - PLEASE REMOVE WHEN EDITING PAGE * -->
    <!-- ********************************************************** -->
    <!-- revision: inline - $Change: 71080 $ -->


    TRIPOD ADVERT CODE


    <!-- END: Catman Footer -->
    <!-- revision: ubiquitous - $Change: 70818 $ -->
    <!-- ******************************************************** -->
    <!-- * END TRIPOD AD CODE - PLEASE REMOVE WHEN EDITING PAGE * -->
    <!-- ******************************************************** -->
    On The End - To This

    Code:
     
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.image.*;
    import java.net.*;
    import java.applet.*;
     
    public class Pixelus extends Applet implements MouseListener {
     
     Image Ioutsquare;
     Image Ioversquare;
     Image Idownsquare;
     
     Image squarelist[];
     
     public void init() {
    	 Ioutsquare = getImage(getCodeBase(), "images/squareout.gif");
    	 Ioversquare = getImage(getCodeBase(), "images/squareover.gif");
    	 Idownsquare = getImage(getCodeBase(), "images/squaredown.gif");
     }
     
     public void paint(Graphics g) {
       for (int x=0; x<5; x++) {
    	 for (int y=0; y<5; y++) {
    	   g.drawImage(Ioutsquare, x*20, y*20, this);
    	 }
       }
     }
     
    	 public void mouseReleased(MouseEvent e) {
     
    	 }
    	 public void mousePressed(MouseEvent e) {
     
    	 }
    	 public void mouseClicked(MouseEvent e) {
     
    	 }
    	 public void mouseEntered(MouseEvent e) {
     
    	 }
    	 public void mouseExited(MouseEvent e) {
     
    	 }
    
    }

  2. #2
    SitePoint Enthusiast Scottie2Hottie7's Avatar
    Join Date
    Jul 2004
    Location
    England
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    NO NEED

    I Put A HTML Page In The Java /* */ Comment Tags


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
  •