Total members 11895 |It is currently Sun Dec 22, 2024 2:16 am Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka






* Project Name:   Java Web Browser
* Programmer:   can ökçelik
* Type:   Network
* Technology:  Java
* IDE:   ANY
* Description:   it's very basic application.you can only calling a page and click links with it.i hoop, i will develop better more sooner..enjoy with it!!

Code:


import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.net.*;
import javax.swing.*;
import javax.swing.event.*;


public class Tarayici extends JFrame implements
ActionListener,HyperlinkListener
{
   private JEditorPane webs;
   private JScrollPane kay;
   private JMenuBar menubar;
   private JMenu menu,hakkimda;
   private JMenuItem menukapa;
   private Button kapat;
   private Button yazdir;
   private Button dugme;
   private TextField kutu;
   private URL url;

   public Tarayici()
   {

      super("Tarayici");
      setSize(950,700);

      Container c=getContentPane();

      dugme=new Button("Git");
      dugme.addActionListener(this);

      menubar=new JMenuBar();
      menu=new JMenu("Dosya");
      hakkimda=new JMenu("Hakkýmda");
      hakkimda.addActionListener(this);
      menukapa=new JMenuItem("Çýkýþ");
      menukapa.addActionListener(this);

      menu.add(menukapa);
      menubar.add(menu);
      menubar.add(hakkimda);

      kapat=new Button("Kapat");
      kapat.addActionListener(this);

      yazdir=new Button("Geri");
      yazdir.addActionListener(this);


      kutu=new TextField("http://www.");
      kutu.addActionListener(this);

      webs=new JEditorPane();
      webs.setEditable(false);
      webs.addHyperlinkListener(this);

      setJMenuBar(menubar);
      c.setLayout(null);

      kay=new JScrollPane(webs);

      kay.setBounds(10,50,940,650);
      kutu.setBounds(10,20,740,25);
      dugme.setBounds(751,20,50,25);
      kapat.setBounds(803,20,50,25);
      yazdir.setBounds(855,20,50,25);

      c.add(kapat);
      c.add(kay);
      c.add(dugme);
      c.add(yazdir);
      c.add(kutu);
      show();
      }

   public void actionPerformed(ActionEvent e)
   {
      setTitle("Kachak Web Tarayici - Site Açýlýyor...");
      setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));

      Object kaynak=e.getSource();
      String satir=kutu.getText();

      if (kaynak==dugme || kaynak==kutu)
      {
         try {
            webs.setPage(satir);
            setTitle("Kachak Web Tarayici - Açýldý");

         }
         catch (IOException ei)
         {
            try {
            webs.setPage("http://www.cmaeal.com/hata/hata.html");
            kutu.setText("hata: sayfaYok");

            }
            catch (IOException se) {
               System.out.print("Hata oldu..");
            }
         }
      }
      else if (kaynak==kapat)
      {
         System.exit(0);
      }

      else if (kaynak==hakkimda)
      {
      JOptionPane.showMessageDialog( this,"Sürüm 1.0","Yazan: Can
ÖKÇELIK",JOptionPane.INFORMATION_MESSAGE );

      }

      else if (kaynak==menukapa)
      {
         System.exit(0);
      }

      else if (kaynak==yazdir)
      {
         webs.setPage((String)yazdir.getEditor().getItem());
      }
   }

   public void hyperlinkUpdate( HyperlinkEvent ea )
   {
      if ( ea.getEventType() ==
      HyperlinkEvent.EventType.ACTIVATED )
   {
        try {
         webs.setPage( ea.getURL().toString() );
         kutu.setText(ea.getURL().toString());
      }
      catch (IOException ei)
      {
            try {
            webs.setPage("http://www.cmaeal.com/hata/hata.html");
            kutu.setText("hata: sayfaYok");
            }
            catch (IOException se) {
               System.out.print("Hata oldu..");
            }

         }
      }
   }


   public static void main(String[] args)
   {
      Tarayici t=new Tarayici();
      t.setVisible(true);
   }


}




Author mail : [email protected]



_________________
M. S. Rakha, Ph.D.
Queen's University
Canada


Author:
Mastermind
User avatar Posts: 2715
Have thanks: 74 time

I personally use a small java brother.And heel Salutation.Can discrimination would even have a file given to you and have a look at it. (Java not give java.)



Author:
Newbie
User avatar Posts: 2
Have thanks: 0 time

Ben Can Ökçeliğin kardeşiyim.Java biliyorum ve dosyayıda veririm.



Author:
Newbie
User avatar Posts: 2
Have thanks: 0 time
Post new topic Reply to topic  [ 3 posts ] 

  Related Posts  to : Java Web Browser (Mini Project)
 code for my mini project     -  
 I am doing my BCA final year. Looking out for a mini project     -  
 need mini chat voice project.     -  
 prapose me a web based mini project     -  
 PC health of remote sever (Mini Project)     -  
 $.browser Check if your browser is IE or FireFox or Chrome     -  
 Video Archive Browser in java     -  
 Help in My Java Project !!!!     -  
 java project     -  
 Java Project     -  



Topic Tags

Java Projects, Java Networking
cron






Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com