Web Browser.....Code is inside...but clarify few things!

HI All,
this is pilot ..sorry to bother u again but this time its kinda important
here is my program for a web browser--
now i wanna know a few things HyperlinkListener just not support javascript nor does it support flash ...thats 2 and i wanna know wht else restrictions that are in this simple browser....
and can u tell me how can i make this browser more faster and i wanna add a JProgressBar to it and i have no clue...please help/
import javax.swing.JFrame;
import javax.swing.JTextField;
import javax.swing.JButton;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JEditorPane;
import javax.swing.JLabel;
import java.io.IOException;
import java.awt.GridBagLayout;
import java.awt.GridBagConstraints;
import java.awt.BorderLayout;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.UIManager;
import javax.swing.JEditorPane;
import javax.swing.event.HyperlinkListener;
import javax.swing.event.HyperlinkEvent;
import javax.swing.JOptionPane;
public class Browser implements ActionListener
     JTextField t1;
     JLabel l1;
     JButton b1;
     GridBagLayout gbl;
     GridBagConstraints gbc;
     JPanel p;
     JFrame frame;
     JScrollPane scrollPane;
     JEditorPane jep;
     static String initialPage;
public Browser()
     //JFrame.setDefaultLookAndFeelDecorated(true);
     /*try
        UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
     catch(Exception e)
         e.printStackTrace();
     frame=new JFrame("Simple Web Browser");
     gbl=new GridBagLayout();
     gbc=new GridBagConstraints();
     p=new JPanel();
     p.setLayout(gbl);
     jep = new JEditorPane();
     t1=new JTextField();
     b1=new JButton("Check it out!");
     b1.addActionListener(this);
     frame.getRootPane().setDefaultButton(b1);
     l1=new JLabel("Address");
     gbc.anchor=GridBagConstraints.NORTHEAST;
     gbc.fill=GridBagConstraints.HORIZONTAL;
     gbc.gridx=0;
     gbc.gridy=0;
     gbc.weightx=0.0;
     gbl.setConstraints(l1,gbc);
     p.add(l1);
     gbc.anchor=GridBagConstraints.NORTHEAST;
     gbc.gridx=1;
     gbc.gridy=0;
     gbc.weightx=1.0;
     gbl.setConstraints(t1,gbc);
     p.add(t1);
     gbc.anchor=GridBagConstraints.NORTHWEST;
     gbc.gridx=2;
     gbc.gridy=0;
     gbc.weightx=0.0;
     gbl.setConstraints(b1,gbc);
     p.add(b1);
    scrollPane = new JScrollPane(jep);
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.getContentPane().add(p,BorderLayout.NORTH);
     frame.getContentPane().add(scrollPane);
    frame.setSize(1000,700);
    frame.setVisible(true);
public void actionPerformed(ActionEvent e)
          initialPage=t1.getText();
          char a=initialPage.charAt(0);
          char b=initialPage.charAt(1);
          char c=initialPage.charAt(2);
          char d=initialPage.charAt(3);
          char ea=initialPage.charAt(4);
          char f=initialPage.charAt(5);
          char g=initialPage.charAt(6);
          if((a=='h')&&(b=='t')&&(c=='t')&&(d=='p')&&(ea==':')&&(f=='/')&&(g=='/'))
               initialPage=t1.getText();
          else
               initialPage="http://"+initialPage;
          jep.setEditable(false);
          jep.addHyperlinkListener(new second(jep));
         try
           jep.setPage(initialPage);
         catch (IOException ae)
            JOptionPane.showMessageDialog(frame,new String("Error: "+ae));
public static void main(String[] args)
          new SimpleWebBrowser();
class second implements HyperlinkListener
  private JEditorPane pane;
  public second(JEditorPane pane)
    this.pane = pane;
public void hyperlinkUpdate(HyperlinkEvent evt)
   if (evt.getEventType() == HyperlinkEvent.EventType.ACTIVATED)
      try
       pane.setPage(evt.getURL());
     catch (Exception e){}
  }}}

Broken Browser excuse me/...check this out ---> run it and tell me if the code is broken...
import javax.swing.JFrame;
import javax.swing.JTextField;
import javax.swing.JButton;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JEditorPane;
import javax.swing.JLabel;
import java.io.IOException;
import java.awt.GridBagLayout;
import java.awt.GridBagConstraints;
import java.awt.BorderLayout;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.UIManager;
import javax.swing.JEditorPane;
import javax.swing.event.HyperlinkListener;
import javax.swing.event.HyperlinkEvent;
import javax.swing.JOptionPane;
public class Browser implements ActionListener
     JTextField t1;
     JLabel l1;
     JButton b1;
     GridBagLayout gbl;
     GridBagConstraints gbc;
     JPanel p;
     JFrame frame;
     JScrollPane scrollPane;
     JEditorPane jep;
     static String initialPage;
public Browser()
     //JFrame.setDefaultLookAndFeelDecorated(true);
     /*try
        UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
     catch(Exception e)
         e.printStackTrace();
     frame=new JFrame("Simple Web Browser");
     gbl=new GridBagLayout();
     gbc=new GridBagConstraints();
     p=new JPanel();
     p.setLayout(gbl);
     jep = new JEditorPane();
     t1=new JTextField();
     b1=new JButton("Check it out!");
     b1.addActionListener(this);
     frame.getRootPane().setDefaultButton(b1);
     l1=new JLabel("Address");
     gbc.anchor=GridBagConstraints.NORTHEAST;
     gbc.fill=GridBagConstraints.HORIZONTAL;
     gbc.gridx=0;
     gbc.gridy=0;
     gbc.weightx=0.0;
     gbl.setConstraints(l1,gbc);
     p.add(l1);
     gbc.anchor=GridBagConstraints.NORTHEAST;
     gbc.gridx=1;
     gbc.gridy=0;
     gbc.weightx=1.0;
     gbl.setConstraints(t1,gbc);
     p.add(t1);
     gbc.anchor=GridBagConstraints.NORTHWEST;
     gbc.gridx=2;
     gbc.gridy=0;
     gbc.weightx=0.0;
     gbl.setConstraints(b1,gbc);
     p.add(b1);
    scrollPane = new JScrollPane(jep);
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.getContentPane().add(p,BorderLayout.NORTH);
     frame.getContentPane().add(scrollPane);
    frame.setSize(1000,700);
    frame.setVisible(true);
public void actionPerformed(ActionEvent e)
          initialPage=t1.getText();
          char a=initialPage.charAt(0);
          char b=initialPage.charAt(1);
          char c=initialPage.charAt(2);
          char d=initialPage.charAt(3);
          char ea=initialPage.charAt(4);
          char f=initialPage.charAt(5);
          char g=initialPage.charAt(6);
          if((a=='h')&&(b=='t')&&(c=='t')&&(d=='p')&&(ea==':')&&(f=='/')&&(g=='/'))
               initialPage=t1.getText();
          else
               initialPage="http://"+initialPage;
          jep.setEditable(false);
          jep.addHyperlinkListener(new second(jep));
         try
           jep.setPage(initialPage);
         catch (IOException ae)
            JOptionPane.showMessageDialog(frame,new String("Error: "+ae));
public static void main(String[] args)
          new Browser();
class second implements HyperlinkListener
  private JEditorPane pane;
  public second(JEditorPane pane)
    this.pane = pane;
public void hyperlinkUpdate(HyperlinkEvent evt)
   if (evt.getEventType() == HyperlinkEvent.EventType.ACTIVATED)
      try
       pane.setPage(evt.getURL());
     catch (Exception e){}
  }}}

Similar Messages

  • Incredible Device/Experience BUT A Few things i would change...

    Please respond with some feedback:
    1. The Ability to Highlight, Copy and Paste (Very Important on a PDA/SmartPhone)
    2. No Recessed Headphone Jack (It should be compatible with any headphones or speaker system. (For example I am visiting my parents right now, and they have it set up so a line input can be readily accessed for iPod use, however i need to use an adaptor in order to make use of it because a standard size jack wont fit the iPhone.
    3. Instead of YouTube.... How about iChat! Thats a novel concept.
    4. The 'Keyboard' only works horizontally when in safari, but not for typing long texts or email message (Do you think that can be corrected in software update???)
    Any Thoughts? Thanks for Reading Mine
    MacBook Pro   Mac OS X (10.4.10)  

    But You are not able to view your online buddies, So i can contact my friends through their phone, or even their AIM or iChat if they IM me first (Because im set up for Mobile IM) But you can see a list of Online Buddies (Meaning Buddies sitting at a computer) Your know what i mean?

  • Open web browser but can't click

    I open my web browser to home page but nothing happens when I click on links or buttons.
    SImilar to a mouse that isn't connected or recognized.

    Turning blue would indicate that your device does recognize it as a hyperlink.
    You do have a BlackBerry Data Plan on your account... you do have a working browser on your device?
    Can you use the browser to open a site?
    My first suggestion is With the BlackBerry device powered ON, remove the battery a few seconds and then reinsert the battery to reboot.
    Then try it again.
    Message Edited by JSanders on 04-22-2009 10:16 AM
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • HT3657 I am on this website trying to install Safari Web browser on my pc to use it instead of internet explorer, but I cannot get to a download anywhere.  Nor can I find it on the Store page.  How do I get to download Safari?

    I am trying to download Safari web browser on my pc but cannot get ot it anywhere.  How do I get to use Safari?

    Matchley wrote:
    Thank you for your help.  Another questions.  For a small business firm of 10 computers what would you suggest the best server.  We now are all pc's but eventually I want to upgrade to Apple.  I currently have the Small Business Server.
    Sorry to say that Apple isn't the best choice in that department as they are primarily a consumer products company, they don't cater to business needs with their offerings.
    Phill Scheiler actually said they are interested in the 50% share of the consumer market.
    Apple has discontinued their X-Server and now OS X server is really just a hobbyist pursuit, not a serious business solution. The Mac Pro hasn't been updated in ages.
    Mac's can be used on Windows, Unix and Linux servers, but on that side of things it's best to use the services of a local server technician. Linux costs nothing for the licenses and is very secure and highly configurable.
    You also can go Red Hat Linux which is a commercial  version of Linux which requires licenses, but you get the better security and reliability plus business support.
    All I can suggest is evaluate your local offerings from many of those type local server business services in you area and go from there. You'll likely be a mixed shop for quite some time or perhaps forever as some won't give up Windows like some won't give up their Mac's.
    Also Mac's are not very cost effective anymore, Apple changes the operating system annually which require new software/paid upgrades, Windows 7 will last another decade and offer desktop models that parts can be exchangesd or replaced in house, unlike Mac's which one has to bring it in and AppleCare expires in three years.
    So buisnesss and profit speaking Windows is pretty good, but if your like Google who has a big bank account then replacing Mac's every couple of years is nothing.

  • ITS service not displaying  page in web browser from trnx SICF

    Hello gurus
    iam having a problem when trying to test ITS fro trnx SICF.The web browser window pops up but it doesnt display anything.The service is active and running.
    i checked at os level in dev_icm log file and found the following error:
    [Thr  5] Mon Oct 25 10:30:52 2010
    [Thr  5] *** ERROR => NiBufIConnect: non-buffered connect pending after 5000ms (hdl 22;10.26.24.44:1090) [nibuf.cpp    4611]
    [Thr  5] *** WARNING => Connection request from (0/1/0) to host: 10.26.24.44, service: 1090 failed (NIECONN_REFUSED)
    [icxxconn_mt.c 2340]
    that is the link that is suppossed to be opened in the web browser ::http://lmntrst01.ba.bc.test123.com:8000/sap/bc/gui/sap/its?sap-client=666
    Has anyone faced a similar problem before.It ERP 6 EHP4  on Solaris SPARC
    Any ideas are most welcome

    Hello,
    Please see note 816973 to clarify some basics first.  Especially steps 3 - 6.
    Also, the URL you posted has no service name and would lead to an error anyways, you should test with WEBGUI or IT00 or some other service.
    Edgar

  • Lumia 800 Web browser keeps shutting itself

    Yesterday I was playing this game Age of Sorcery when it crashed. Since then the game, weather view app and the web browser are all shutting down in few seconds when I try to open any one of them.
    I have tried reinstalling the apps, restarting the phone and reseting the phone (soft and hard), but yet nothing has solved the problem.
    Also after the reset I tried to reinstall previously purchased apps from windowsphone.com but it says the apps cannot be sent at the moment, try again later. I hope there's a way to get those apps back without buying them again.
    Any suggestions?

    Ok so let me define that all web browsers and apps based on web browser are crashing. On the other hand, marketplace, zune and nokia music for example are working normally.
    No problem in downloading purchased content anymore. Purchases are saved on windows account.

  • How do you make a web browser?

    I would like to make a Web Browser of my own but how did you make FireFox?

    Read this:
    http://thepattysite.com/window_sizes1.cfm
    You don't want to try to launch your site to full screen,
    honest, as you'd
    drive your (potential) visitors away.
    Jo
    "Steve Zavodny" <[email protected]> wrote in
    message
    news:escrfa$s7$[email protected]..
    > How do you make a web browser launch your site to a
    specific size or even
    > full screen?
    > Thanks...

  • How do I get the Adobe toolbar to display above a pdf in the web browser?

    Hi guys,
    I'm just having trouble with locating the grey toolbar, it's not displaying when I open a .pdf in a web browser.
    I can open the .pdf fine, (within Safari), and usually (on my old computer) there was a grey toolbar above the .pdf & there's a print icon on it - that's what I'm looking for, so that I can print my lecture notes straight away.
    The toolbar won't display on the web browser above the .pdf, but if I save the .pdf & open it with Adobe Reader, then the toolbar displays there with all of the icons etc.
    So I was wanting to know if instead of saving them every time, if there's an option to get the toolbar displaying above .pdfs in Safari?
    Has anyone else encountered this problem?
    Any help would be greatly appreciated.

    Unfortunately, iOS does not provide a way to install "plugins" to Safari so there is no possible way the Reader can do this. You can use the "open in" functionality to launch Reader from Safari.

  • Unable to view PDF files in web browser iphone4s

    I am having problems with viewing PDF files on iphone4s.
    I used to be able to view the PDF files in the web browser (mobile and desktop)but now I can't . I am using hotmail.co.uk account.
    I can view the PDF file on the 'Mail' app on the the iphone, but as I have a '3 day push' limit I goto the web browser to view but the message comes up 'viewing of PDF files has been disabled in Microsoft word mobile, please contact your administrator'.
    The only way I current can view the PDF file  in the browser is to send the email back to my self and view it in the mobile version of the hotmail website. Cannot see the attachment at all in the mobile hotmail website at all prior to re sending it to my self now the desktop version before or after sending the attachment back to my self
    Hope there's no confusion
    Thank you

    Oh ok thanks , seemed kinda odd that it started to happen all of a sudden. I checked all the settings etc in hotmail account no luck . I will get onto their website.
    Thanks for your reply.
    Meanwhile, If someone has experienced this problem please let me know

  • Links in web browser opposed to Adobe Pro

    I have a problem that I am trying to fix.  I have an intranet map application(opened in IE) that allows in house users to *click* a feature to open a general Information.pdf about that map feature (ie. street sign).  the general information pdf has links to additional pdf's about that sign(inspection reports, etc)
    The preferences>Internet in Adobe Pro 9.2 are set to open in the program not the web browser because editing capabilities for the users are manditory.
    So the problem is that when the general information.pdf is opening it opens in an IE temp directory fashion and not in its network location (\\jacas02\structures\app..... etc).  The link to the additional documents are then looking for those additional documents in a location relative to the temp file location(C:\Documents and Settings\.....etc) and not the actually document location on the network.  Therefore the document/file can not be found.
    If we enable the pdf to be opened in the web browser everything works fine but we don't have the adobe pro functionality.  Any suggestions or links to related articles would be greatly appreciated.
    Also, can adobe pro functionallity be enabled in the adobe IE web browser?
    thanks for any suggestions!
    jac

    This is a map application served by ArcGIS Server.  I don't think that is relevant though.  I suspect that this is between IE and Adobe.
    How would setting a base URL be applied?  All of the General Info pdf's are in one folder on the network \\jacas02\structures\app\INFO
    Then within that INFO folder I have additional folders that contain all of the linked documents that are not being found because adobe is opening the file from IE in a temp location.
    If I set the base URL to \\jacas02\structures\app\INFO  should that work even though it is a 'UNC'?
    thanks for you interest, it seems that this should be a easy issue to solve but its got me stumped.
    Also, forgot to add.  The links have always been relative in adobe as long as you keep them organized the same as when you created the links in adobe.
    jac

  • Why no web browser on Apple TV?

    I have just installed Apple TV, which replaced an old Elgato EyeHome. One of the nice features of this device was that it in addition to all the streaming features it allowed web browsing (though via a very poor browser!). I was wondering why Apple have not included a web browser in Apple TV, especially since an iPhone can now be used as a keyboard?
    One other feature of the EyeHome was that it allowed many different formats to be viewed on your TV, not just iTunes compatible formats....
    Tony

    Sr. Vergas wrote:
    @Winston
    TV screens should be better than computer monitors. TVs easily do 1920x1080 resolution @ 60Hz, while only the best computer monitors are capable of such. The majority of computer monitors by default are doing 1024x768, with maybe the option of going up to 1280x1024, both at 60 hertz. This makes TV excellent candidates for web browsing! I'm running a web browser on my ATV and it looks great!! I just wish I could figure out how to make a mouse and keyboard work with it.
    Cobalt Jacket wrote:
    To be sure, pretty much any computer monitor from recent times should be able to do 60Hz.
    Also, some of the newer TVs are 120Hz (30 * 4 = 120, 24 * 5 = 120).
    Not really the whole picture though is it. There are some tv's that might display a web browser with reasonable clarity, but not many. Most 1080 tv's do not actually have 1920 x 1080 pixels - they simply upscale a 1080 signal. And of course more important than the overall resolution is the relative resolution by area and more importantly the distance between pixels, then of course there is overscan, anti-aliasing, brightness, pixel pitch, viewing angle, colour bit depth, response time and more that tv's simply can't compete with a computer monitors on.

  • Is it possible to open up an excel file inside a Web Browser not IE?

    I'm trying to find out if it is possible to open up a pivot excel file inside the a web browser, but i don't want to use Internet Explorer for that i'd prefer firefox for that.
    I have a web application that uses an excel file for one of its reports but i don't want the user to have to download the file in order to view the report and that particular report has various ordering criteria so i don't want any of the funtionality of the file to be lost in the process, so is it possible to do it? what tools would help me acomplish that?

    I don't think this is possible.
    You may be able to make it display in Firefox if the file is defined as the XML Excel format and not the xls or xlsx formats. But that would require saving the file differently and you would most likely loose all/most functionality
    You may find some Excel translators in Java (most notably POI from Apache). But they would still require you to adapt them to web format and you would have to duplicate much of the Excel functionality yourself. So it would be a long term option.
    You could check out Google Docs. They have a spreadsheet application that I believe can convert Excel files to their format. You may be able to use it inside your web site with permissions.

  • Published a site in iweb but looks different in the web browser

    Hi,
    I have published a site in iWeb but it looks different when viewed in the web browser having published a few times.
    The pictures have small frames around which display perfectly i niweb but do not show in browser?
    The navigation menu is all showing in iweb but again not showing in the web browser?
    Not sure what I am doing wrong? I have tried to publish a few times.. checked that all the tick boxes show 'display navigation menu' etc?
    Thanks
    Toni

    Since you do not provide real varifiable, factual information I searched for :
    http://www.google.com/search?q=toni+darcy%27s+Products
    Is this you?
    http://www.tonidarcy.co.uk/toni_darcy_photographer/toni_darcy._photographer._wel come..html
    I noticed on the Pricing page that I cannot click the Gallery link. Something covering it?
    Other pages have similar behaviour.
    And there's no link for the home page. Perhaps you're hiding it.
    And see if you can use a shorter, and different, Sitename. It is clear who you are. And just welcome is enough.
    And empty the browser cache.

  • Which t-codes will start web-browser in SCM7.0?

    I am new to SCM7.0 but I have experience at PI7.1/PI7.0.
    On PI7.0 there are some t-codes such as sxmb_ifr, sldcheck, etc which will start a web-browser.
    Could you list the SCM  tcode that will launch web-browser as well?
    Thank you!

    Hi Christy Kelly,
    Some of the following t-codes uses web-browser
    /N/SAPAPO/CLPISDP
    /SAPAPO/CLPIPCAL
    /SCA/ICH - SNC
    /SCA/ICH_S - SNC - Supplier View
    /SCA/ICH_C - SNC - Customer View
    /SCA/ICH_G - SNC - Goods Recipient View
    /SCA/ICH_RR_NA - Responsive Replenishment
    /SCA/ICH_RET - Returns Processing - Customer View
    /SCA/ICH_RETV - Returns Processing - Supplier View
    /SCA/ICH_RETG - Returns Processing - Goods Recipient View
    Hope this helps you.  Please confirm.
    Regards
    R. Senthil Mareeswaran.

  • I downloaded an update for my Safari web browser to "snow leopard". When I click on the .dmg file, a window opens up with a .pkg file but when I click on the .pkg file I get a prompt saying that it doesn't know what program to open it with. with a

    I downloaded an update for my Safari web browser to "snow leopard". When I click on the .dmg file, a window opens up with a .pkg file but when I click on the .pkg file I get a prompt saying that it doesn't know what program to open it with.

    I suspect if you're trying to open a file in 08 that's been opened in 09 the file has been updated to 09 and will not open in 08.

Maybe you are looking for

  • Two i4's same itunes account

    So i have two i4's on my itunes account.  one for me and one for my wife.  Is there anyway that we can keep our contacts separate?                                                                                                                        

  • Yoga 2 Pro Camera Pixelated? - Windows 8.1

    Hey Everyone, I just received my Yoga 2 last week, and I opened up the camera app and the image was very pixilated.  Has anyone else experienced this?  I am not picky about my webcam quality, but I would expect it to look similar to my camera phone i

  • AppDomain was unloaded - out of memory happened

    Hi, Please help me to resolve this SQL server error - Im getting below error occasionally and sometimes it gets resolved by itself. Error: AppDomain mydatabase.public[runtime].44 was unloaded by escalation policy to ensure the consistency of your app

  • ICloud Photo Sharing / Safari sync on 5s, iOS 7.1.2

    Hi Apple experts: An iPhone 5s (A1457/A1530) running on iOS 7.1.2. During usage I observe battery life ( be it usage or standby ) about 1/3 lower than average. Turned off iCloud service from the start of re-installing 7.1.2 (in DFU mode) last time al

  • Flash Is Slow/Crashes? How can I OVERCLOCK Flash?

    This is clearly not an isolated problem as multiple similar inquiries have already been made on this topic: http://forums.adobe.com/message/5577432#5577432 http://forums.adobe.com/thread/933530 http://forums.adobe.com/message/3722411#3722411 Moreover